1
Fork 0
tildes-reextended/source/ts/background.ts

12 lines
394 B
TypeScript
Raw Normal View History

2019-11-10 17:38:47 +00:00
import {browser} from 'webextension-polyfill-ts';
// Add listeners to open the options page when:
// * The extension icon gets clicked.
// * The extension first gets installed.
browser.browserAction.onClicked.addListener(openOptionsPage);
browser.runtime.onInstalled.addListener(openOptionsPage);
async function openOptionsPage(): Promise<void> {
await browser.runtime.openOptionsPage();
}