diff options
| author | Phil Crosby | 2009-11-08 00:22:59 -0800 |
|---|---|---|
| committer | Phil Crosby | 2009-11-08 00:46:27 -0800 |
| commit | 4828c9b56585bbf0e090934187cc5397df4536cd (patch) | |
| tree | c95fe02798bbdddaadb0ba81ebcfef121141198d | |
| parent | e71075e8b19933b333ec92f3a080e9f7e9ff2b26 (diff) | |
| download | vimium-4828c9b56585bbf0e090934187cc5397df4536cd.tar.bz2 | |
Crank down the initial step size a bit; add commands for page up and page down.
| -rw-r--r-- | background_page.html | 2 | ||||
| -rw-r--r-- | vimiumFrontend.js | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/background_page.html b/background_page.html index 91a5ed69..fc19fa4a 100644 --- a/background_page.html +++ b/background_page.html @@ -98,6 +98,8 @@ keyToCommandRegistry['l'] = 'scrollRight'; keyToCommandRegistry['gg'] = 'scrollToTop'; keyToCommandRegistry['G'] = 'scrollToBottom'; + keyToCommandRegistry['<c-d>'] = "scrollPageDown"; + keyToCommandRegistry['<c-u>'] = "scrollPageUp"; keyToCommandRegistry['r'] = 'reload'; keyToCommandRegistry['ba'] = 'goBack'; diff --git a/vimiumFrontend.js b/vimiumFrontend.js index 5c5c93ce..f9a42d75 100644 --- a/vimiumFrontend.js +++ b/vimiumFrontend.js @@ -1,4 +1,4 @@ -var SCROLL_STEP_SIZE = 100; // Pixels +var SCROLL_STEP_SIZE = 60; // Pixels document.addEventListener("keydown", onKeydown); document.addEventListener("focus", onFocusCapturePhase, true); @@ -13,6 +13,8 @@ function scrollToBottom() { window.scrollTo(0, document.body.scrollHeight); } function scrollToTop() { window.scrollTo(0, 0); } function scrollUp() { window.scrollBy(0, -1 * SCROLL_STEP_SIZE); } function scrollDown() { window.scrollBy(0, SCROLL_STEP_SIZE); } +function scrollPageUp() { window.scrollBy(0, -6 * SCROLL_STEP_SIZE); } +function scrollPageDown() { window.scrollBy(0, 6 * SCROLL_STEP_SIZE); } function scrollLeft() { window.scrollBy(-1 * SCROLL_STEP_SIZE, 0); } function scrollRight() { window.scrollBy(SCROLL_STEP_SIZE, 0); } |
