Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/chrome/content/code/HTTPSRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,18 @@ const HTTPSRules = {
intoList.push(fromList[i]);
},

loadAllRulesets: function() {
for (var host in this.targets) {
var ruleset_ids = this.targets[host];
for (var i = 0; i < ruleset_ids.length; i++) {
var id = ruleset_ids[i];
if (!this.rulesetsByID[id]) {
this.loadRulesetById(id);
}
}
}
},

// Load a ruleset by numeric id, e.g. 234
// NOTE: This call runs synchronously, which can lock up the browser UI. Is
// there any way to fix that, given that we need to run blocking in the request
Expand Down
6 changes: 4 additions & 2 deletions src/chrome/content/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https_everywhere = CC["@eff.org/https-everywhere;1"]
.getService(Components.interfaces.nsISupports)
.wrappedJSObject;

rulesets = Array.slice(https_everywhere.https_rules.rulesets);
rulesets = [];

const id_prefix = "he_enable";
const pref_prefix = "extensions.https_everywhere.";
Expand Down Expand Up @@ -149,7 +149,9 @@ function compareRules(a, b, col) {

function https_prefs_init(doc) {
var st = document.getElementById('sites_tree');

https_everywhere.https_rules.loadAllRulesets();
rulesets = Array.slice(https_everywhere.https_rules.rulesets);

// GLOBAL VARIABLE!
treeView = {
rules: rulesets,
Expand Down