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 /content_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 'content_scripts')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 4 |
1 files changed, 2 insertions, 2 deletions
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() |
