diff options
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/settings.coffee | 4 | ||||
| -rw-r--r-- | background_scripts/sync.coffee | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/background_scripts/settings.coffee b/background_scripts/settings.coffee index ad89888e..f75c1db3 100644 --- a/background_scripts/settings.coffee +++ b/background_scripts/settings.coffee @@ -14,12 +14,12 @@ root.Settings = Settings = else jsonValue = JSON.stringify value localStorage[key] = jsonValue - root.Sync.set key, jsonValue + Sync.set key, jsonValue clear: (key) -> if @has key delete localStorage[key] - root.Sync.clear key + Sync.clear key has: (key) -> key of localStorage diff --git a/background_scripts/sync.coffee b/background_scripts/sync.coffee index 7cb77518..40e0c5c3 100644 --- a/background_scripts/sync.coffee +++ b/background_scripts/sync.coffee @@ -59,19 +59,19 @@ root.Sync = Sync = return # Ok: accept, store and propagate this update. - defaultValue = root.Settings.defaults[key] + defaultValue = Settings.defaults[key] defaultValueJSON = JSON.stringify(defaultValue) if value && value != defaultValueJSON # Key/value has been changed to non-default value at remote instance. @log "update: #{key}=#{value}" localStorage[key] = value - root.Settings.doPostUpdateHook key, JSON.parse(value) + Settings.doPostUpdateHook key, JSON.parse(value) else # Key has been reset to default value at remote instance. @log "clear: #{key}" delete localStorage[key] - root.Settings.doPostUpdateHook key, defaultValue + Settings.doPostUpdateHook key, defaultValue # Only called synchronously from within vimium, never on a callback. # No need to propagate updates into the rest of vimium. |
