Skip to content

Commit 75c397e

Browse files
committed
Remove tabs
1 parent 0e3971f commit 75c397e

File tree

1 file changed

+52
-52
lines changed

1 file changed

+52
-52
lines changed

src/chrome/content/code/ApplicableList.js

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ ApplicableList.prototype = {
7272
HTTPSEverywhere.instance.https_rules.rewrittenURI(this, this.doc.baseURIObject);
7373
this.log(DBUG, "populating using alist #" + this.serial);
7474
this.document = document;
75-
76-
var https_everywhere = CC["@eff.org/https-everywhere;1"].getService(Components.interfaces.nsISupports).wrappedJSObject;
77-
var o_httpsprefs = https_everywhere.get_prefs();
75+
76+
var https_everywhere = CC["@eff.org/https-everywhere;1"].getService(Components.interfaces.nsISupports).wrappedJSObject;
77+
var o_httpsprefs = https_everywhere.get_prefs();
7878

7979
// get the menu popup
8080
this.menupopup = menupopup;
@@ -83,19 +83,19 @@ ApplicableList.prototype = {
8383
while(this.menupopup.firstChild.tagName != "menuseparator") {
8484
this.menupopup.removeChild(this.menupopup.firstChild);
8585
}
86-
87-
// add global enable/disable toggle button
88-
var strings = document.getElementById("HttpsEverywhereStrings");
89-
90-
var enableLabel = document.createElement('menuitem');
91-
var text = strings.getString("https-everywhere.menu.globalDisable");
92-
if(!o_httpsprefs.getBoolPref("globalEnabled"))
93-
text = strings.getString("https-everywhere.menu.globalEnable");
94-
95-
enableLabel.setAttribute('label', text);
96-
enableLabel.setAttribute('command', 'https-everywhere-menuitem-globalEnableToggle');
97-
this.prepend_child(enableLabel);
98-
86+
87+
// add global enable/disable toggle button
88+
var strings = document.getElementById("HttpsEverywhereStrings");
89+
90+
var enableLabel = document.createElement('menuitem');
91+
var text = strings.getString("https-everywhere.menu.globalDisable");
92+
if(!o_httpsprefs.getBoolPref("globalEnabled"))
93+
text = strings.getString("https-everywhere.menu.globalEnable");
94+
95+
enableLabel.setAttribute('label', text);
96+
enableLabel.setAttribute('command', 'https-everywhere-menuitem-globalEnableToggle');
97+
this.prepend_child(enableLabel);
98+
9999
// add the label at the top
100100
var any_rules = false
101101
for (var x in this.all) {
@@ -124,37 +124,37 @@ ApplicableList.prototype = {
124124
this.commandset.removeChild(this.commandset.firstChild);
125125
}
126126

127-
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
127+
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
128128
.getService(Components.interfaces.nsIWindowMediator);
129-
130-
var domWin = wm.getMostRecentWindow("navigator:browser").content.document.defaultView.top;
131-
var location = domWin.document.baseURIObject.asciiSpec; //full url, including about:certerror details
132-
133-
if(location.substr(0, 6) == "about:"){
134-
//"From" portion of the rule is retrieved from the location bar via document.getElementById("urlbar").value
135-
136-
var fromHost = document.getElementById("urlbar").value;
137-
138-
//scheme must be trimmed out to check for applicable rulesets
139-
if(fromHost.indexOf("://") != -1)
140-
fromHost = fromHost.substr(fromHost.indexOf("://") + 3, fromHost.length);
141-
142-
//trim off any page locations - we only want the host - e.g. domain.com
143-
if(fromHost.indexOf("/") != -1)
144-
fromHost = fromHost.substr(0, fromHost.indexOf("/"));
145-
146-
//Search for applicable rulesets for the host listed in the location bar
147-
var alist = HTTPSRules.potentiallyApplicableRulesets(fromHost);
148-
149-
for (var i = 0 ; i < alist.length ; i++){
150-
//For each applicable rulset, determine active/inactive, and append to proper list.
151-
if(o_httpsprefs.getBoolPref(alist[i].name))
152-
this.active_rule(alist[i]);
153-
else
154-
this.inactive_rule(alist[i]);
155-
}
156-
}
157-
129+
130+
var domWin = wm.getMostRecentWindow("navigator:browser").content.document.defaultView.top;
131+
var location = domWin.document.baseURIObject.asciiSpec; //full url, including about:certerror details
132+
133+
if(location.substr(0, 6) == "about:"){
134+
//"From" portion of the rule is retrieved from the location bar via document.getElementById("urlbar").value
135+
136+
var fromHost = document.getElementById("urlbar").value;
137+
138+
//scheme must be trimmed out to check for applicable rulesets
139+
if(fromHost.indexOf("://") != -1)
140+
fromHost = fromHost.substr(fromHost.indexOf("://") + 3, fromHost.length);
141+
142+
//trim off any page locations - we only want the host - e.g. domain.com
143+
if(fromHost.indexOf("/") != -1)
144+
fromHost = fromHost.substr(0, fromHost.indexOf("/"));
145+
146+
//Search for applicable rulesets for the host listed in the location bar
147+
var alist = HTTPSRules.potentiallyApplicableRulesets(fromHost);
148+
149+
for (var i = 0 ; i < alist.length ; i++){
150+
//For each applicable rulset, determine active/inactive, and append to proper list.
151+
if(o_httpsprefs.getBoolPref(alist[i].name))
152+
this.active_rule(alist[i]);
153+
else
154+
this.inactive_rule(alist[i]);
155+
}
156+
}
157+
158158
// add all applicable commands
159159
for(var x in this.breaking)
160160
this.add_command(this.breaking[x]);
@@ -165,7 +165,7 @@ ApplicableList.prototype = {
165165
for(var x in this.inactive)
166166
this.add_command(this.inactive[x]);
167167

168-
if(o_httpsprefs.getBoolPref("globalEnabled")){
168+
if(o_httpsprefs.getBoolPref("globalEnabled")){
169169
// add all the menu items
170170
for (var x in this.inactive)
171171
this.add_menuitem(this.inactive[x], 'inactive');
@@ -177,12 +177,12 @@ ApplicableList.prototype = {
177177
for (var x in this.active)
178178
if (!(x in this.breaking))
179179
this.add_menuitem(this.active[x], 'active');
180-
for (var x in this.breaking)
181-
this.add_menuitem(this.breaking[x], 'breaking');
182-
180+
for (var x in this.breaking)
181+
this.add_menuitem(this.breaking[x], 'breaking');
182+
183183
this.prepend_child(label);
184-
}
185-
184+
}
185+
186186
},
187187

188188
prepend_child: function(node) {

0 commit comments

Comments
 (0)