diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-26 16:24:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-26 16:24:14 +0900 |
commit | cd584c8e243bafa8fc284279f716e8113607cd65 (patch) | |
tree | bc39bc30369f149e4ba4b6dc9c353b2906c4ef90 /src/shared/messages.ts | |
parent | 07897df636ca3e732490d53fd2acf947738bf16e (diff) | |
parent | 34a96cdc9c5d7c8a11c6f1ae512fbc97724f61c4 (diff) |
Merge pull request #592 from ueokande/repeat-last-operation
Add "repeat last operation" command
Diffstat (limited to 'src/shared/messages.ts')
-rw-r--r-- | src/shared/messages.ts | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/shared/messages.ts b/src/shared/messages.ts index fbd3478..36a23d8 100644 --- a/src/shared/messages.ts +++ b/src/shared/messages.ts @@ -42,6 +42,11 @@ export const SETTINGS_QUERY = 'settings.query'; export const CONSOLE_FRAME_MESSAGE = 'console.frame.message'; +export const NAVIGATE_HISTORY_NEXT = 'navigate.history.next'; +export const NAVIGATE_HISTORY_PREV = 'navigate.history.prev'; +export const NAVIGATE_LINK_NEXT = 'navigate.link.next'; +export const NAVIGATE_LINK_PREV = 'navigate.link.prev'; + export interface BackgroundOperationMessage { type: typeof BACKGROUND_OPERATION; operation: operations.Operation; @@ -204,6 +209,22 @@ export interface ConsoleFrameMessageMessage { message: any; } +export interface NavigateHistoryNextMessage { + type: typeof NAVIGATE_HISTORY_NEXT; +} + +export interface NavigateHistoryPrevMessage { + type: typeof NAVIGATE_HISTORY_PREV; +} + +export interface NavigateLinkNext { + type: typeof NAVIGATE_LINK_NEXT; +} + +export interface NavigateLinkPrev { + type: typeof NAVIGATE_LINK_PREV; +} + export type Message = BackgroundOperationMessage | ConsoleUnfocusMessage | @@ -236,7 +257,11 @@ export type Message = OpenUrlMessage | SettingsChangedMessage | SettingsQueryMessage | - ConsoleFrameMessageMessage; + ConsoleFrameMessageMessage | + NavigateHistoryNextMessage | + NavigateHistoryPrevMessage | + NavigateLinkNext | + NavigateLinkPrev; // eslint-disable-next-line complexity export const valueOf = (o: any): Message => { @@ -272,6 +297,10 @@ export const valueOf = (o: any): Message => { case SETTINGS_CHANGED: case SETTINGS_QUERY: case CONSOLE_FRAME_MESSAGE: + case NAVIGATE_HISTORY_NEXT: + case NAVIGATE_HISTORY_PREV: + case NAVIGATE_LINK_NEXT: + case NAVIGATE_LINK_PREV: return o; } throw new Error('unknown operation type: ' + o.type); |