From 76622cd99cf671531cfa21c5d6243f3e4e185116 Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Mon, 29 Oct 2012 17:56:32 -0400 Subject: 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. --- content_scripts/vimium_frontend.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index e7ced988..026b0c15 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -221,13 +221,13 @@ extend window, scrollToLeft: -> Scroller.scrollTo "x", 0 scrollToRight: -> Scroller.scrollTo "x", "max" scrollUp: -> Scroller.scrollBy "y", -1 * settings.get("scrollStepSize") - scrollDown: -> Scroller.scrollBy "y", parseFloat(settings.get("scrollStepSize")) + scrollDown: -> Scroller.scrollBy "y", settings.get("scrollStepSize") scrollPageUp: -> Scroller.scrollBy "y", "viewSize", -1/2 scrollPageDown: -> Scroller.scrollBy "y", "viewSize", 1/2 scrollFullPageUp: -> Scroller.scrollBy "y", "viewSize", -1 scrollFullPageDown: -> Scroller.scrollBy "y", "viewSize" scrollLeft: -> Scroller.scrollBy "x", -1 * settings.get("scrollStepSize") - scrollRight: -> Scroller.scrollBy "x", parseFloat(settings.get("scrollStepSize")) + scrollRight: -> Scroller.scrollBy "x", settings.get("scrollStepSize") extend window, reload: -> window.location.reload() -- cgit v1.2.3