aboutsummaryrefslogtreecommitdiff
path: root/src/actions/operation.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-08 15:04:55 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-10-08 15:04:55 +0900
commit39fb5400370b818760dc7bcfe42e74b2512a840d (patch)
tree5191fc93c4cf1489c9ddd9d0003e30137a967018 /src/actions/operation.js
parentd886d7de290b6fee00c55c5487416048f3de4bf2 (diff)
separate content
Diffstat (limited to 'src/actions/operation.js')
-rw-r--r--src/actions/operation.js43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/actions/operation.js b/src/actions/operation.js
deleted file mode 100644
index a27cd02..0000000
--- a/src/actions/operation.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import operations from 'shared/operations';
-import messages from 'shared/messages';
-import * as scrolls from 'content/scrolls';
-import * as navigates from 'content/navigates';
-import * as followActions from 'actions/follow';
-
-const exec = (operation) => {
- switch (operation.type) {
- case operations.SCROLL_LINES:
- return scrolls.scrollLines(window, operation.count);
- case operations.SCROLL_PAGES:
- return scrolls.scrollPages(window, operation.count);
- case operations.SCROLL_TOP:
- return scrolls.scrollTop(window);
- case operations.SCROLL_BOTTOM:
- return scrolls.scrollBottom(window);
- case operations.SCROLL_HOME:
- return scrolls.scrollLeft(window);
- case operations.SCROLL_END:
- return scrolls.scrollRight(window);
- case operations.FOLLOW_START:
- return followActions.enable(false);
- case operations.NAVIGATE_HISTORY_PREV:
- return navigates.historyPrev(window);
- case operations.NAVIGATE_HISTORY_NEXT:
- return navigates.historyNext(window);
- case operations.NAVIGATE_LINK_PREV:
- return navigates.linkPrev(window);
- case operations.NAVIGATE_LINK_NEXT:
- return navigates.linkNext(window);
- case operations.NAVIGATE_PARENT:
- return navigates.parent(window);
- case operations.NAVIGATE_ROOT:
- return navigates.root(window);
- default:
- browser.runtime.sendMessage({
- type: messages.BACKGROUND_OPERATION,
- operation,
- });
- }
-};
-
-export { exec };