Skip to content

Commit 7b03a5d

Browse files
committed
Always show the menu, rather than a bizarre error popup.
1 parent 13aa43c commit 7b03a5d

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/chrome/content/toolbar_button.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff 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

5955
function toggle_rule(rule_id) {

src/components/https-everywhere.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)