fix method name

jh-changes
Shin'ya Ueoka 7 years ago
parent 8c84930ca3
commit cf36bf192c
  1. 4
      src/content/actions/operation.js
  2. 6
      src/content/scrolls.js

@ -19,9 +19,9 @@ const exec = (operation) => {
case operations.SCROLL_BOTTOM: case operations.SCROLL_BOTTOM:
return scrolls.scrollBottom(window); return scrolls.scrollBottom(window);
case operations.SCROLL_HOME: case operations.SCROLL_HOME:
return scrolls.scrollLeft(window); return scrolls.scrollHome(window);
case operations.SCROLL_END: case operations.SCROLL_END:
return scrolls.scrollRight(window); return scrolls.scrollEnd(window);
case operations.FOLLOW_START: case operations.FOLLOW_START:
return followActions.enable(false); return followActions.enable(false);
case operations.NAVIGATE_HISTORY_PREV: case operations.NAVIGATE_HISTORY_PREV:

@ -32,13 +32,13 @@ const scrollBottom = (page) => {
page.scrollTo(x, y); page.scrollTo(x, y);
}; };
const scrollLeft = (page) => { const scrollHome = (page) => {
let x = 0; let x = 0;
let y = page.scrollY; let y = page.scrollY;
page.scrollTo(x, y); page.scrollTo(x, y);
}; };
const scrollRight = (page) => { const scrollEnd = (page) => {
let x = page.scrollMaxX; let x = page.scrollMaxX;
let y = page.scrollY; let y = page.scrollY;
page.scrollTo(x, y); page.scrollTo(x, y);
@ -46,5 +46,5 @@ const scrollRight = (page) => {
export { export {
scrollVertically, scrollHorizonally, scrollPages, scrollVertically, scrollHorizonally, scrollPages,
scrollTop, scrollBottom, scrollLeft, scrollRight scrollTop, scrollBottom, scrollHome, scrollEnd
}; };