aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/exclusions.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-05-07 10:26:01 +0100
committerStephen Blott2015-05-07 10:26:05 +0100
commit0b0ca954d568505934576c2c138a371b48dabbca (patch)
tree4ec70be8e2213d3917e21e29ecf899dda7bc1027 /background_scripts/exclusions.coffee
parent9fdb630d891019620041041001b9dff022008ee0 (diff)
downloadvimium-0b0ca954d568505934576c2c138a371b48dabbca.tar.bz2
Clear RegexpCache when option saved.
Fixes #1641.
Diffstat (limited to 'background_scripts/exclusions.coffee')
-rw-r--r--background_scripts/exclusions.coffee5
1 files changed, 3 insertions, 2 deletions
diff --git a/background_scripts/exclusions.coffee b/background_scripts/exclusions.coffee
index b3a3960d..5ec76e2a 100644
--- a/background_scripts/exclusions.coffee
+++ b/background_scripts/exclusions.coffee
@@ -2,6 +2,7 @@ root = exports ? window
RegexpCache =
cache: {}
+ clear: -> @cache = {}
get: (pattern) ->
if regexp = @cache[pattern]
regexp
@@ -44,8 +45,8 @@ root.Exclusions = Exclusions =
@rules = rules.filter (rule) -> rule and rule.pattern
Settings.set("exclusionRules", @rules)
- postUpdateHook: (rules) ->
- @rules = rules
+ postUpdateHook: (@rules) ->
+ RegexpCache.clear()
# Development and debug only.
# Enable this (temporarily) to restore legacy exclusion rules from backup.