diff options
Diffstat (limited to 'src/content/client')
-rw-r--r-- | src/content/client/AddonIndicatorClient.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/content/client/AddonIndicatorClient.ts b/src/content/client/AddonIndicatorClient.ts new file mode 100644 index 0000000..afb9fa4 --- /dev/null +++ b/src/content/client/AddonIndicatorClient.ts @@ -0,0 +1,16 @@ +import * as messages from '../../shared/messages'; + +export default interface AddonIndicatorClient { + setEnabled(enabled: boolean): Promise<void>; + + // eslint-disable-next-line semi +} + +export class AddonIndicatorClientImpl implements AddonIndicatorClient { + setEnabled(enabled: boolean): Promise<void> { + return browser.runtime.sendMessage({ + type: messages.ADDON_ENABLED_RESPONSE, + enabled, + }); + } +} |