File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -43,17 +43,13 @@ function show_applicable_list() {
4343 var HTTPSEverywhere = CC [ "@eff.org/https-everywhere;1" ] . getService ( Components . interfaces . nsISupports ) . wrappedJSObject ;
4444 var alist = HTTPSEverywhere . getExpando ( domWin , "applicable_rules" , null ) ;
4545
46- if ( alist ) {
47- //alist.log(WARN,"Success wherein domWin is " + domWin);
48- //alist.show_applicable();
49- alist . populate_menu ( document ) ;
50- } else {
51- HTTPSEverywhere . log ( WARN , "Failure wherein domWin is " + domWin ) ;
52- var str = "Missing applicable rules for " + domWin . document . baseURIObject . spec ;
53- str += "\ndomWin is " + domWin ;
54- alert ( str ) ;
55- return null ;
46+ if ( ! alist ) {
47+ // This case occurs for error pages and similar. We need a dummy alist
48+ // because populate_menu lives in there. Would be good to refactor this
49+ // away.
50+ alist = new ApplicableList ( HTTPSEverywhere . log , document , domWin ) ;
5651 }
52+ alist . populate_menu ( document ) ;
5753}
5854
5955function toggle_rule ( rule_id ) {
Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ HTTPSEverywhere.prototype = {
318318 return null ;
319319 }
320320 if ( ! nc ) {
321- this . log ( WARN , "no window for " + channel . URI . spec ) ;
321+ this . log ( DBUG , "no window for " + channel . URI . spec ) ;
322322 return null ;
323323 }
324324 try {
You can’t perform that action at this time.
0 commit comments