Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/stchris/vimium into stchr…
Browse files Browse the repository at this point in the history
…is-master
  • Loading branch information
ilya committed Jan 29, 2011
2 parents 6b85107 + 41bdf13 commit a84c9cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ function clearKeyMappingsAndSetDefaults() {

mapKeyToCommand('zi', 'zoomIn');
mapKeyToCommand('zo', 'zoomOut');
mapKeyToCommand('z0', 'zoomReset');

mapKeyToCommand('gi', 'focusInput');

Expand Down Expand Up @@ -154,6 +155,7 @@ addCommand('reload', 'Reload the page');
addCommand('toggleViewSource', 'View page source');
addCommand('zoomIn', 'Zoom in');
addCommand('zoomOut', 'Zoom out');
addCommand('zoomReset', 'Reset zoom to default value');
addCommand('copyCurrentUrl', 'Copy the current URL to the clipboard');

addCommand('enterInsertMode', 'Enter insert mode');
Expand Down Expand Up @@ -195,7 +197,7 @@ var commandGroups = {
["scrollDown", "scrollUp", "scrollLeft", "scrollRight",
"scrollToTop", "scrollToBottom", "scrollToLeft", "scrollToRight", "scrollPageDown",
"scrollPageUp", "scrollFullPageUp", "scrollFullPageDown",
"reload", "toggleViewSource", "zoomIn", "zoomOut", "copyCurrentUrl", "goUp",
"reload", "toggleViewSource", "zoomIn", "zoomOut", "zoomReset", "copyCurrentUrl", "goUp",
"enterInsertMode", "focusInput",
"activateLinkHintsMode", "activateLinkHintsModeToOpenInNewTab", "activateLinkHintsModeWithQueue",
"goPrevious", "goNext",
Expand Down
5 changes: 5 additions & 0 deletions vimiumFrontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ function zoomOut() {
saveZoomLevel(window.location.host, currentZoomLevel);
}

function zoomReset() {
setPageZoomLevel(100, true);
saveZoomLevel(window.location.host, 100);
}

function scrollToBottom() { window.scrollTo(window.pageXOffset, document.body.scrollHeight); }
function scrollToTop() { window.scrollTo(window.pageXOffset, 0); }
function scrollToLeft() { window.scrollTo(0, window.pageYOffset); }
Expand Down

0 comments on commit a84c9cb

Please sign in to comment.