aboutsummaryrefslogtreecommitdiff
path: root/src/content/actions/operation.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-01-13 19:49:11 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-01-13 19:51:22 +0900
commit335b9ca47458b1817ef7705f4d999c25f423fad9 (patch)
treead7fd77301dbabd8fce40b34f7088f1ca766f15b /src/content/actions/operation.js
parent8fea1e5cd298fe04868b7b5ddbfbcc15c9d93f0e (diff)
fix smooth scroll on key repeated
Diffstat (limited to 'src/content/actions/operation.js')
-rw-r--r--src/content/actions/operation.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/content/actions/operation.js b/src/content/actions/operation.js
index d2e258c..1c0a5fb 100644
--- a/src/content/actions/operation.js
+++ b/src/content/actions/operation.js
@@ -8,7 +8,7 @@ import * as addonActions from './addon';
import * as properties from 'shared/settings/properties';
// eslint-disable-next-line complexity
-const exec = (operation, settings) => {
+const exec = (operation, repeat, settings) => {
let smoothscroll = settings.properties.smoothscroll ||
properties.defaults.smoothscroll;
switch (operation.type) {
@@ -27,19 +27,19 @@ const exec = (operation, settings) => {
type: messages.FIND_PREV,
}), '*');
case operations.SCROLL_VERTICALLY:
- return scrolls.scrollVertically(operation.count, smoothscroll);
+ return scrolls.scrollVertically(operation.count, smoothscroll, repeat);
case operations.SCROLL_HORIZONALLY:
- return scrolls.scrollHorizonally(operation.count, smoothscroll);
+ return scrolls.scrollHorizonally(operation.count, smoothscroll, repeat);
case operations.SCROLL_PAGES:
- return scrolls.scrollPages(operation.count, smoothscroll);
+ return scrolls.scrollPages(operation.count, smoothscroll, repeat);
case operations.SCROLL_TOP:
- return scrolls.scrollTop(smoothscroll);
+ return scrolls.scrollTop(smoothscroll, repeat);
case operations.SCROLL_BOTTOM:
- return scrolls.scrollBottom(smoothscroll);
+ return scrolls.scrollBottom(smoothscroll, repeat);
case operations.SCROLL_HOME:
- return scrolls.scrollHome(smoothscroll);
+ return scrolls.scrollHome(smoothscroll, repeat);
case operations.SCROLL_END:
- return scrolls.scrollEnd(smoothscroll);
+ return scrolls.scrollEnd(smoothscroll, repeat);
case operations.FOLLOW_START:
return window.top.postMessage(JSON.stringify({
type: messages.FOLLOW_START,