aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2014-04-19 00:13:36 +0100
committerStephen Blott2014-04-19 00:13:36 +0100
commit654738cb4d566c5e0b2d1e229dd9055403af35f6 (patch)
tree5b9997fdfce03452f51ee8896470dbd726571339
parent75234c78cf13be08608ccd2b6bcecf2757b199ff (diff)
downloadvimium-654738cb4d566c5e0b2d1e229dd9055403af35f6.tar.bz2
Code review of Sync().
-rw-r--r--background_scripts/settings.coffee8
1 files changed, 4 insertions, 4 deletions
diff --git a/background_scripts/settings.coffee b/background_scripts/settings.coffee
index 063287db..ad89888e 100644
--- a/background_scripts/settings.coffee
+++ b/background_scripts/settings.coffee
@@ -7,14 +7,14 @@ root.Settings = Settings =
get: (key) ->
if (key of localStorage) then JSON.parse(localStorage[key]) else @defaults[key]
- set: (key, value, doNotSync) ->
+ set: (key, value) ->
# don't store the value if it is equal to the default, so we can change the defaults in the future
if (value == @defaults[key])
@clear(key)
else
- jsonified = JSON.stringify value
- localStorage[key] = jsonified
- root.Sync.set key, jsonified
+ jsonValue = JSON.stringify value
+ localStorage[key] = jsonValue
+ root.Sync.set key, jsonValue
clear: (key) ->
if @has key