Browser extension to hide view-reducing screen junk from websites.

bannerbanner/src/ background_script.js
10 lines
359 B

  1. import browser from 'webextension-polyfill'
  2. import PageActionButton from './PageActionButton'
  3. import { toggleEnabled, isEnabled, onEnabledChange } from './perOrigin'
  4. const pageActionButton = PageActionButton({
  5. icon: async tab => (await isEnabled(tab.url)) ? '/icon_enabled.svg' : '/icon_disabled.svg',
  6. onClicked: async tab => toggleEnabled(tab.url),
  7. })