rename history navigation

jh-changes
Shin'ya Ueoka 7 years ago
parent ae317113e7
commit aeb0e0f96d
  1. 4
      src/background/keys.js
  2. 8
      src/content/histories.js
  3. 10
      src/content/index.js
  4. 8
      src/content/navigates.js
  5. 4
      src/operations/index.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) => {

@ -1,8 +0,0 @@
const prev = (win) => {
win.history.back();
};
const next = (win) => {
win.history.forward();
};
export { prev, next };

@ -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);
}
};

@ -0,0 +1,8 @@
const historyPrev = (win) => {
win.history.back();
};
const historyNext = (win) => {
win.history.forward();
};
export { historyPrev, historyNext };

@ -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',