File tree 2 files changed +17
-20
lines changed
2 files changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -129,23 +129,4 @@ chrome.webRequest.onBeforeSendHeaders.addListener(function(details) {
129
129
// Remove WebRTC local and public IP leakage
130
130
chrome . privacy . network . webRTCIPHandlingPolicy . set ( {
131
131
value : 'disable_non_proxied_udp'
132
- } ) ;
133
-
134
- /*
135
- // Create a Notification
136
- chrome.extension.onRequest.addListener(
137
- function(request, sender, sendResponse) {
138
- var options = {
139
- type: "basic",
140
- title: "Someone is accessing your chrome canvas!!",
141
- message: "Extension has added noise to the imagedata",
142
- iconUrl: "icon16.png"
143
- }
144
-
145
- chrome.notifications.create(options, callback);
146
-
147
- function callback(){
148
- console.log("Someone accessed the canvas!!");
149
- }
150
- });
151
- */
132
+ } ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,22 @@ function toggleTorProxy(cb) {
35
35
chrome . proxy . settings . set ( { value : config , scope : 'regular' } , function ( ) {
36
36
proxied = ! proxied ;
37
37
38
+ if ( proxied ) {
39
+ // Create a Notification
40
+ var options = {
41
+ type : "basic" ,
42
+ title : "You are in Tor network!!" ,
43
+ message : "Browsing may be slow, but tor is safe" ,
44
+ iconUrl : "icon16.png"
45
+ }
46
+
47
+ chrome . notifications . create ( options , callback ) ;
48
+
49
+ function callback ( ) {
50
+ console . log ( "Someone accessed the canvas!!" ) ;
51
+ }
52
+ }
53
+
38
54
// From example https://developer.chrome.com/extensions/webRequest
39
55
// update header processing
40
56
chrome . webRequest . onBeforeSendHeaders . removeListener ( processHeaders ) ;
You can’t perform that action at this time.
0 commit comments