|
- import browser from 'webextension-polyfill'
-
- import PageActionButton from './PageActionButton'
- import { toggleEnabled, isEnabled, onEnabledChange } from './perOrigin'
-
- const pageActionButton = PageActionButton({
- icon: async tab => (await isEnabled(tab.url)) ? '/icon_enabled.svg' : '/icon_disabled.svg',
- title: async tab => (await isEnabled(tab.url)) ? 'Unhide banners' : 'Hide banners',
- onClicked: async tab => toggleEnabled(tab.url),
- })
|