aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/exclusions.coffee
diff options
context:
space:
mode:
authorStephen Blott2014-12-21 11:49:13 +0000
committerStephen Blott2014-12-21 11:49:13 +0000
commit98fd49a6cfe660c363aecb6ebe0a4cb69342808d (patch)
treeac8c87e7a38bbea43703a8eda321abef0779ed56 /background_scripts/exclusions.coffee
parenteb5750642c54e4c6ad6e12d348f0ce3d40bac0e1 (diff)
downloadvimium-98fd49a6cfe660c363aecb6ebe0a4cb69342808d.tar.bz2
Exclusion; show state.
Diffstat (limited to 'background_scripts/exclusions.coffee')
-rw-r--r--background_scripts/exclusions.coffee6
1 files changed, 3 insertions, 3 deletions
diff --git a/background_scripts/exclusions.coffee b/background_scripts/exclusions.coffee
index a8d65d62..12d86f41 100644
--- a/background_scripts/exclusions.coffee
+++ b/background_scripts/exclusions.coffee
@@ -23,9 +23,9 @@ root.Exclusions = Exclusions =
rules: Settings.get("exclusionRules")
- # Merge the matching rules for URL, or null.
- getRule: (url) ->
- matching = (rule for rule in @rules when url.match(RegexpCache.get(rule.pattern)))
+ # Merge the matching rules for URL, or null. If rules are provided, match against those.
+ getRule: (url, rules=@rules) ->
+ matching = (rule for rule in rules when rule.pattern and url.match(RegexpCache.get(rule.pattern)))
# An absolute exclusion rule (with no passKeys) takes priority.
for rule in matching
return rule unless rule.passKeys