Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
Do not test inactive rulesets
Browse files Browse the repository at this point in the history
  • Loading branch information
pde committed Sep 4, 2014
1 parent a1df852 commit 4728db2
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/chrome/content/ruleset-tests.js
Expand Up @@ -36,12 +36,21 @@ function testRunner() {
var num = 0;

for(var target in HTTPSEverywhere.https_rules.targets) {
var active_ids = [];
if(!target.indexOf("*") != -1) {
urls.push({
url: 'https://'+target,
target: target,
ruleset_ids: HTTPSEverywhere.https_rules.targets[target]
});
var ruleset_ids = HTTPSEverywhere.https_rules.targets[target];
for (var n = 0; n < ruleset_ids.length; n++) {
var rs_id = ruleset_ids[n];
var rs = HTTPSEverywhere.https_rules.rulesetsByID[rs_id];
if (rs.active) { active_ids.push(rs_id) };
}
if (active_ids.length > 0) {
urls.push({
url: 'https://'+target,
target: target,
ruleset_ids: HTTPSEverywhere.https_rules.targets[target]
});
}
}
}

Expand Down

0 comments on commit 4728db2

Please sign in to comment.