diff options
-rw-r--r-- | src/content/actions/operation.js | 4 | ||||
-rw-r--r-- | src/content/scrolls.js | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/content/actions/operation.js b/src/content/actions/operation.js index 1302404..9187514 100644 --- a/src/content/actions/operation.js +++ b/src/content/actions/operation.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: diff --git a/src/content/scrolls.js b/src/content/scrolls.js index 90bcc54..86ea554 100644 --- a/src/content/scrolls.js +++ b/src/content/scrolls.js @@ -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 }; |