@@ -10,6 +10,10 @@ INFO=3;
1010NOTE = 4 ;
1111WARN = 5 ;
1212
13+ HTTPSEverywhere = CC [ "@eff.org/https-everywhere;1" ]
14+ . getService ( Components . interfaces . nsISupports )
15+ . wrappedJSObject ;
16+
1317function https_everywhere_load ( ) {
1418 // on first run, put the context menu in the addons bar
1519 try {
@@ -57,7 +61,6 @@ function show_applicable_list(menupopup) {
5761 return null ;
5862 }
5963
60- var HTTPSEverywhere = CC [ "@eff.org/https-everywhere;1" ] . getService ( Components . interfaces . nsISupports ) . wrappedJSObject ;
6164 var alist = HTTPSEverywhere . getExpando ( domWin , "applicable_rules" , null ) ;
6265 var weird = false ;
6366
@@ -73,19 +76,16 @@ function show_applicable_list(menupopup) {
7376
7477function toggle_rule ( rule_id ) {
7578 // toggle the rule state
76- var HTTPSEverywhere = CC [ "@eff.org/https-everywhere;1" ]
77- . getService ( Components . interfaces . nsISupports )
78- . wrappedJSObject ;
7979 HTTPSEverywhere . https_rules . rulesetsByID [ rule_id ] . toggle ( ) ;
8080 var domWin = content . document . defaultView . top ;
8181 /*if (domWin instanceof CI.nsIDOMWindow) {
8282 var alist = HTTPSEverywhere.getExpando(domWin,"applicable_rules", null);
8383 if (alist) alist.empty();
8484 }*/
85- reload_window ( HTTPSEverywhere ) ;
85+ reload_window ( ) ;
8686}
8787
88- function reload_window ( HTTPSEverywhere ) {
88+ function reload_window ( ) {
8989 var domWin = content . document . defaultView . top ;
9090 if ( ! ( domWin instanceof CI . nsIDOMWindow ) ) {
9191 HTTPSEverywhere . log ( WARN , domWin + " is not an nsIDOMWindow" ) ;
@@ -110,10 +110,3 @@ function open_in_tab(url) {
110110 var recentWindow = wm . getMostRecentWindow ( "navigator:browser" ) ;
111111 recentWindow . delayedOpenTab ( url , null , null , null , null ) ;
112112}
113-
114- function chrome_opener ( uri ) {
115- // we don't use window.open, because we need to work around TorButton's state control
116- CC [ '@mozilla.org/appshell/window-mediator;1' ] . getService ( CI . nsIWindowMediator )
117- . getMostRecentWindow ( 'navigator:browser' )
118- . open ( uri , '' , 'chrome,centerscreen' ) ;
119- }
0 commit comments