aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/settings.coffee
diff options
context:
space:
mode:
authormrmr19932015-04-27 19:29:39 +0100
committermrmr19932015-05-29 12:06:00 +0100
commitd7a0daf5fa2c0a3302a8fc6b9fa0744cfa17ab42 (patch)
tree0079be406f4d8a116f4b7b5a6663290d3e005c60 /background_scripts/settings.coffee
parent31873e39772c538cab418d03c244b4cac1addba0 (diff)
downloadvimium-d7a0daf5fa2c0a3302a8fc6b9fa0744cfa17ab42.tar.bz2
Move registration of postUpdateHooks to the corresponding source files
This completely decouples settings.coffee from all other background source files, so that it can (eventually) also be used in the frontend.
Diffstat (limited to 'background_scripts/settings.coffee')
-rw-r--r--background_scripts/settings.coffee13
1 files changed, 3 insertions, 10 deletions
diff --git a/background_scripts/settings.coffee b/background_scripts/settings.coffee
index 44676ad7..6b33d239 100644
--- a/background_scripts/settings.coffee
+++ b/background_scripts/settings.coffee
@@ -75,17 +75,10 @@ root.Settings = Settings =
has: (key) -> key of localStorage
- # For settings which require action when their value changes, add hooks here called from
- # options/options.coffee (when the options page is saved), and from background_scripts/sync.coffee (when an
+ # For settings which require action when their value changes, add hooks to this object, to be called from
+ # options/options.coffee (when the options page is saved), and by Settings.storeAndPropagate (when an
# update propagates from chrome.storage.sync).
- postUpdateHooks:
- keyMappings: (value) ->
- root.Commands.clearKeyMappingsAndSetDefaults()
- root.Commands.parseCustomKeyMappings value
- root.refreshCompletionKeysAfterMappingSave()
-
- exclusionRules: (value) ->
- root.Exclusions.postUpdateHook value
+ postUpdateHooks: {}
# postUpdateHooks convenience wrapper
performPostUpdateHook: (key, value) ->