diff options
| author | Jez Ng | 2012-10-29 17:56:32 -0400 |
|---|---|---|
| committer | Jez Ng | 2012-10-29 18:28:33 -0400 |
| commit | 76622cd99cf671531cfa21c5d6243f3e4e185116 (patch) | |
| tree | bf0e1922a7f872ea044d3828f3b9e1fdcd67c1c8 /background_scripts | |
| parent | c0af54eac713be14d1e3eceeca23139455abb408 (diff) | |
| download | vimium-76622cd99cf671531cfa21c5d6243f3e4e185116.tar.bz2 | |
Convert strings to numbers when saving options page.
This avoids the need to continually re-parse the strings each time we
load the option value.
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/settings.coffee | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/background_scripts/settings.coffee b/background_scripts/settings.coffee index fc78d48f..2eb7c1d6 100644 --- a/background_scripts/settings.coffee +++ b/background_scripts/settings.coffee @@ -21,7 +21,7 @@ root.Settings = Settings = # options/options.(coffee|html) only handle booleans and strings; therefore # all defaults must be booleans or strings defaults: - scrollStepSize: "60" + scrollStepSize: 60 linkHintCharacters: "sadfjklewcmpgh" linkHintNumbers: "0123456789" filterLinkHints: false @@ -62,6 +62,9 @@ root.Settings = Settings = # default/fall back search engine searchUrl: "http://www.google.com/search?q=" -# Initialization code. -# We use this parameter to coordinate any necessary schema changes. + settingsVersion: Utils.getCurrentVersion() + +# We use settingsVersion to coordinate any necessary schema changes. +if Utils.compareVersions("1.41", Settings.get("settingsVersion")) != -1 + Settings.set("scrollStepSize", parseFloat Settings.get("scrollStepSize")) Settings.set("settingsVersion", Utils.getCurrentVersion()) |
