diff options
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/exclusions.coffee | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/background_scripts/exclusions.coffee b/background_scripts/exclusions.coffee index db86e583..a8d65d62 100644 --- a/background_scripts/exclusions.coffee +++ b/background_scripts/exclusions.coffee @@ -26,8 +26,11 @@ root.Exclusions = Exclusions = # Merge the matching rules for URL, or null. getRule: (url) -> matching = (rule for rule in @rules when url.match(RegexpCache.get(rule.pattern))) + # An absolute exclusion rule (with no passKeys) takes priority. + for rule in matching + return rule unless rule.passKeys if matching.length - pattern: (rule.pattern for rule in matching).join " | " # Not used; for documentation/debugging only. + pattern: (rule.pattern for rule in matching).join " | " # Not used; for debugging only. passKeys: (rule.passKeys for rule in matching).join "" else null |
