From a7ade501f7c85632208c74e3553305c815159d01 Mon Sep 17 00:00:00 2001 From: Shin'ya UEOKA Date: Sun, 9 May 2021 02:37:54 +0000 Subject: Support reader-mode --- src/background/presenters/TabPresenter.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/background/presenters') 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; } export class TabPresenterImpl implements TabPresenter { @@ -152,6 +154,10 @@ export class TabPresenterImpl implements TabPresenter { ): void { browser.tabs.onActivated.addListener(listener); } + + toggleReaderMode(tabId: number): Promise { + return browser.tabs.toggleReaderMode(tabId); + } } const tabPresenter = new TabPresenterImpl(); -- cgit v1.2.3