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:
return scrolls.scrollBottom(window);
case operations.SCROLL_HOME:
return scrolls.scrollLeft(window);
return scrolls.scrollHome(window);
case operations.SCROLL_END:
return scrolls.scrollRight(window);
return scrolls.scrollEnd(window);
case operations.FOLLOW_START:
return followActions.enable(false);
case operations.NAVIGATE_HISTORY_PREV:

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