File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 6666
6767 cursor : pointer;
6868 }
69+
70+ button # codecov-uninstall {
71+ background : white;
72+ border : 1px solid black;
73+ color : black;
74+ margin-left : 10px ;
75+ }
6976 </ style >
7077 </ head >
7178 < body >
@@ -91,13 +98,20 @@ <h1>Codecov Browser Extension</h1>
9198 > privacy policy</ a
9299 > .
93100 </ p >
101+ < p >
102+ The Codecov extension may collect and use information from your browser
103+ such as your IP address and the URLs of the pages you access on
104+ https://github.com or on an enterprise version or self-hosted
105+ installation of Github you explicitly grant the extension access to.
106+ </ p >
94107 < p >
95108 By clicking 'Accept', you confirm that you understand and agree to the
96109 privacy policy of the Codecov Browser Extension. Should you decide not
97110 to accept, please note that the extension will not work.
98111 </ p >
99112 < br />
100113 < button id ="codecov-consent-accept "> Accept</ button >
114+ < button id ="codecov-uninstall "> Uninstall</ button >
101115 </ div >
102116 </ body >
103117</ html >
Original file line number Diff line number Diff line change 11document . addEventListener ( "DOMContentLoaded" , function ( ) {
2- var button = document . getElementById ( "codecov-consent-accept" ) ;
3- button . addEventListener ( "click" , async function ( ) {
2+ var consentButton = document . getElementById ( "codecov-consent-accept" ) ;
3+ consentButton . addEventListener ( "click" , async function ( ) {
44 const result = await browser . runtime . sendMessage ( {
55 type : "set_consent" ,
66 payload : true ,
@@ -15,4 +15,20 @@ document.addEventListener("DOMContentLoaded", function () {
1515 ) ;
1616 }
1717 } ) ;
18+
19+ var uninstallButton = document . getElementById ( "codecov-uninstall" ) ;
20+ uninstallButton . addEventListener ( "click" , async function ( ) {
21+ await browser . management
22+ . uninstallSelf ( )
23+ . then ( ( ) => {
24+ console . log ( "App uninstalled, closing tab" ) ;
25+ close ( ) ;
26+ } )
27+ . catch ( ( ) => {
28+ console . log (
29+ "Uninstall confirmation declined or something else went wrong."
30+ ) ;
31+ close ( ) ;
32+ } ) ;
33+ } ) ;
1834} ) ;
You can’t perform that action at this time.
0 commit comments