diff options
Diffstat (limited to 'src/background/clients/NavigateClient.ts')
-rw-r--r-- | src/background/clients/NavigateClient.ts | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/background/clients/NavigateClient.ts b/src/background/clients/NavigateClient.ts new file mode 100644 index 0000000..bdd94ec --- /dev/null +++ b/src/background/clients/NavigateClient.ts @@ -0,0 +1,29 @@ +import { injectable } from 'tsyringe'; +import * as messages from '../../shared/messages'; + +@injectable() +export default class NavigateClient { + async historyNext(tabId: number): Promise<void> { + await browser.tabs.sendMessage(tabId, { + type: messages.NAVIGATE_HISTORY_NEXT, + }); + } + + async historyPrev(tabId: number): Promise<void> { + await browser.tabs.sendMessage(tabId, { + type: messages.NAVIGATE_HISTORY_PREV, + }); + } + + async linkNext(tabId: number): Promise<void> { + await browser.tabs.sendMessage(tabId, { + type: messages.NAVIGATE_LINK_NEXT, + }); + } + + async linkPrev(tabId: number): Promise<void> { + await browser.tabs.sendMessage(tabId, { + type: messages.NAVIGATE_LINK_PREV, + }); + } +} |