aboutsummaryrefslogtreecommitdiff
path: root/src/background/presenters
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-05-09 06:16:16 +0000
committerGitHub <noreply@github.com>2021-05-09 06:16:16 +0000
commit479efbdb4116a13d27f0ac7e8abb3ef86bdd6273 (patch)
tree84c7c8713cb5b2d8846f4d7d6a10a0003ac73577 /src/background/presenters
parent93af58dae4e19b8e0024fd593d1feb1e4459e2ad (diff)
parent410189d7499886b1ac5d8e12a4fe76863cc28934 (diff)
Merge pull request #1145 from ueokande/toggle-reader-mode
Toggle reader view
Diffstat (limited to 'src/background/presenters')
-rw-r--r--src/background/presenters/TabPresenter.ts6
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();