aboutsummaryrefslogtreecommitdiff
path: root/src/content/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/index.js')
-rw-r--r--src/content/index.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/content/index.js b/src/content/index.js
index 91f5420..a9ccd63 100644
--- a/src/content/index.js
+++ b/src/content/index.js
@@ -1,7 +1,7 @@
import '../console/console-frame.scss';
import * as consoleFrames from '../console/frames';
import * as scrolls from '../content/scrolls';
-import * as histories from '../content/histories';
+import * as navigates from '../content/navigates';
import Follow from '../content/follow';
import operations from '../operations';
import messages from '../messages';
@@ -15,7 +15,7 @@ window.addEventListener('keypress', (e) => {
browser.runtime.sendMessage({
type: messages.KEYDOWN,
code: e.which,
- ctrl: e.ctrl
+ ctrl: e.ctrlKey
});
});
@@ -35,10 +35,18 @@ const execOperation = (operation) => {
return scrolls.scrollRight(window);
case operations.FOLLOW_START:
return new Follow(window.document, operation.newTab);
- case operations.HISTORY_PREV:
- return histories.prev(window);
- case operations.HISTORY_NEXT:
- return histories.next(window);
+ 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);
}
};