diff options
| author | Stephen Blott | 2014-12-21 09:24:37 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2014-12-21 09:24:37 +0000 | 
| commit | d715bf897dd72bfad8aa6573e1919afc66b02e3a (patch) | |
| tree | b23ef3b3554a3a44864fa60caec910559a5251d6 /background_scripts/exclusions.coffee | |
| parent | ef41858c387cb6157c59907d6eec7b0324f13ce2 (diff) | |
| download | vimium-d715bf897dd72bfad8aa6573e1919afc66b02e3a.tar.bz2 | |
Exclusion; absolute exclusion rules taje priority.
Diffstat (limited to 'background_scripts/exclusions.coffee')
| -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  | 
