diff options
| author | Stephen Blott | 2012-10-28 09:15:56 +0000 |
|---|---|---|
| committer | Stephen Blott | 2012-10-28 09:15:56 +0000 |
| commit | 8ab335ad9b189881a19ecaa241361541690f6115 (patch) | |
| tree | 33e465104533be9269b5a1d28fc29de9f8c96401 /background_scripts | |
| parent | 12c9084bb9fd7fd269ad49d96eb14419c1b0bf03 (diff) | |
| download | vimium-8ab335ad9b189881a19ecaa241361541690f6115.tar.bz2 | |
Make the default value for scrollStepSize a string.
This interacts with these lines from settings.coffee:
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)
If the default value is numeric, then this test NEVER succeeds (because
"==" is compiled to "===", and the types don't match).
So, scrollStepSize is stored in localStorage even if it has its default
value. Which obviates the intention of the line quoted above.
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/settings.coffee | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/background_scripts/settings.coffee b/background_scripts/settings.coffee index 812fc775..aed509e4 100644 --- a/background_scripts/settings.coffee +++ b/background_scripts/settings.coffee @@ -18,8 +18,10 @@ root.Settings = Settings = has: (key) -> key of localStorage + # options/options.(coffee|html) only handle booleans and strings; therefore + # all defaults must be booleans or strings defaults: - scrollStepSize: 60 + scrollStepSize: "60" linkHintCharacters: "sadfjklewcmpgh" filterLinkHints: false hideHud: false |
