From 21404ad534278eff643be089da9c07882b29da82 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 27 Aug 2017 17:59:25 +0900 Subject: support 0/$ commands --- src/content/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/content/index.js') diff --git a/src/content/index.js b/src/content/index.js index 6bf5d57..9dd3706 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -49,10 +49,16 @@ const invokeEvent = (action) => { scrolls.scrollPages(window, action[1]); break; case actions.SCROLL_TOP: - scrolls.scrollTop(window, action[1]); + scrolls.scrollTop(window); break; case actions.SCROLL_BOTTOM: - scrolls.scrollBottom(window, action[1]); + scrolls.scrollBottom(window); + break; + case actions.SCROLL_LEFT: + scrolls.scrollLeft(window); + break; + case actions.SCROLL_RIGHT: + scrolls.scrollRight(window); break; case actions.FOLLOW_START: new Follow(window.document, action[1] || false); -- cgit v1.2.3