diff options
| -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); } |
