aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/background/keys.js4
-rw-r--r--src/content/histories.js8
-rw-r--r--src/content/index.js10
-rw-r--r--src/content/navigates.js8
-rw-r--r--src/operations/index.js4
5 files changed, 17 insertions, 17 deletions
diff --git a/src/background/keys.js b/src/background/keys.js
index 9121e0f..577f023 100644
--- a/src/background/keys.js
+++ b/src/background/keys.js
@@ -28,8 +28,8 @@ const defaultKeymap = {
'zz': { type: operations.ZOOM_NEUTRAL },
'f': { type: operations.FOLLOW_START, newTab: false },
'F': { type: operations.FOLLOW_START, newTab: true },
- 'H': { type: operations.HISTORY_PREV },
- 'L': { type: operations.HISTORY_NEXT },
+ 'H': { type: operations.NAVIGATE_HISTORY_PREV },
+ 'L': { type: operations.NAVIGATE_HISTORY_NEXT },
};
const asKeymapChars = (keys) => {
diff --git a/src/content/histories.js b/src/content/histories.js
deleted file mode 100644
index 9c5665d..0000000
--- a/src/content/histories.js
+++ /dev/null
@@ -1,8 +0,0 @@
-const prev = (win) => {
- win.history.back();
-};
-const next = (win) => {
- win.history.forward();
-};
-
-export { prev, next };
diff --git a/src/content/index.js b/src/content/index.js
index 91f5420..be01089 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';
@@ -35,10 +35,10 @@ 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);
}
};
diff --git a/src/content/navigates.js b/src/content/navigates.js
new file mode 100644
index 0000000..28f34c5
--- /dev/null
+++ b/src/content/navigates.js
@@ -0,0 +1,8 @@
+const historyPrev = (win) => {
+ win.history.back();
+};
+const historyNext = (win) => {
+ win.history.forward();
+};
+
+export { historyPrev, historyNext };
diff --git a/src/operations/index.js b/src/operations/index.js
index c2db007..6d8cc7e 100644
--- a/src/operations/index.js
+++ b/src/operations/index.js
@@ -11,8 +11,8 @@ export default {
SCROLL_LEFT: 'scroll.left',
SCROLL_RIGHT: 'scroll.right',
FOLLOW_START: 'follow.start',
- HISTORY_PREV: 'history.prev',
- HISTORY_NEXT: 'history.next',
+ NAVIGATE_HISTORY_PREV: 'navigate.history.prev',
+ NAVIGATE_HISTORY_NEXT: 'navigate.history.next',
// Background
TABS_CLOSE: 'tabs.close',