From aeb0e0f96de7b2f9b5a143c8a900e2349bb0702a Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 17 Sep 2017 09:26:51 +0900 Subject: rename history navigation --- src/content/histories.js | 8 -------- src/content/index.js | 10 +++++----- src/content/navigates.js | 8 ++++++++ 3 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 src/content/histories.js create mode 100644 src/content/navigates.js (limited to 'src/content') 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 }; -- cgit v1.2.3