diff options
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/histories.js | 8 | ||||
-rw-r--r-- | src/content/index.js | 10 | ||||
-rw-r--r-- | src/content/navigates.js | 8 |
3 files changed, 13 insertions, 13 deletions
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 }; |