diff options
author | Shin'ya UEOKA <ueokande@i-beam.org> | 2021-05-09 02:37:54 +0000 |
---|---|---|
committer | Shin'ya UEOKA <ueokande@i-beam.org> | 2021-05-09 02:37:54 +0000 |
commit | a7ade501f7c85632208c74e3553305c815159d01 (patch) | |
tree | 27a43ae9ba44cb295c4825d81fe52bc7cb9ef004 /src/background/presenters | |
parent | 48bee8f5d2b4a5c5996870b46afeadefed86106e (diff) |
Support reader-mode
Diffstat (limited to 'src/background/presenters')
-rw-r--r-- | src/background/presenters/TabPresenter.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/background/presenters/TabPresenter.ts b/src/background/presenters/TabPresenter.ts index 2f8f5d9..ef4b343 100644 --- a/src/background/presenters/TabPresenter.ts +++ b/src/background/presenters/TabPresenter.ts @@ -47,6 +47,8 @@ export default interface TabPresenter { onSelected( listener: (arg: { tabId: number; windowId: number }) => void ): void; + + toggleReaderMode(tabId: number): Promise<void>; } export class TabPresenterImpl implements TabPresenter { @@ -152,6 +154,10 @@ export class TabPresenterImpl implements TabPresenter { ): void { browser.tabs.onActivated.addListener(listener); } + + toggleReaderMode(tabId: number): Promise<void> { + return browser.tabs.toggleReaderMode(tabId); + } } const tabPresenter = new TabPresenterImpl(); |