aboutsummaryrefslogtreecommitdiff
path: root/src/content/actions/operation.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-10-13 22:15:16 +0900
committerGitHub <noreply@github.com>2018-10-13 22:15:16 +0900
commit8b72aac09af476e19da7e482e43769d47d1969b2 (patch)
tree7b5628784afc557e3c887e32c36e5bd49bac90d5 /src/content/actions/operation.js
parentb09a4d1bae85eea537d80a5077cdd17d849cfaa5 (diff)
parent3c40b74a3e8d87ba310b46e24d6465d48766e3e8 (diff)
Merge pull request #486 from ueokande/jump-marks
Support jump marks
Diffstat (limited to 'src/content/actions/operation.js')
-rw-r--r--src/content/actions/operation.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/content/actions/operation.js b/src/content/actions/operation.js
index 89d7fec..1aeb8be 100644
--- a/src/content/actions/operation.js
+++ b/src/content/actions/operation.js
@@ -6,6 +6,7 @@ import * as focuses from 'content/focuses';
import * as urls from 'content/urls';
import * as consoleFrames from 'content/console-frames';
import * as addonActions from './addon';
+import * as markActions from './mark';
import * as properties from 'shared/settings/properties';
// eslint-disable-next-line complexity, max-lines-per-function
@@ -39,16 +40,16 @@ const exec = (operation, repeat, settings, addonEnabled) => {
scrolls.scrollPages(operation.count, smoothscroll, repeat);
break;
case operations.SCROLL_TOP:
- scrolls.scrollTop(smoothscroll, repeat);
+ scrolls.scrollToTop(smoothscroll);
break;
case operations.SCROLL_BOTTOM:
- scrolls.scrollBottom(smoothscroll, repeat);
+ scrolls.scrollToBottom(smoothscroll);
break;
case operations.SCROLL_HOME:
- scrolls.scrollHome(smoothscroll, repeat);
+ scrolls.scrollToHome(smoothscroll);
break;
case operations.SCROLL_END:
- scrolls.scrollEnd(smoothscroll, repeat);
+ scrolls.scrollToEnd(smoothscroll);
break;
case operations.FOLLOW_START:
window.top.postMessage(JSON.stringify({
@@ -57,6 +58,10 @@ const exec = (operation, repeat, settings, addonEnabled) => {
background: operation.background,
}), '*');
break;
+ case operations.MARK_SET_PREFIX:
+ return markActions.startSet();
+ case operations.MARK_JUMP_PREFIX:
+ return markActions.startJump();
case operations.NAVIGATE_HISTORY_PREV:
navigates.historyPrev(window);
break;