From 8ab335ad9b189881a19ecaa241361541690f6115 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 28 Oct 2012 09:15:56 +0000 Subject: 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. --- background_scripts/settings.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'background_scripts/settings.coffee') 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 -- cgit v1.2.3