aboutsummaryrefslogtreecommitdiff
path: root/src/background/presenters/indicator.js
blob: 57375190afbfa6023c5e51583fec63531b13a951 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
export default class IndicatorPresenter {
  indicate(enabled) {
    let path = enabled
      ? 'resources/enabled_32x32.png'
      : 'resources/disabled_32x32.png';
    return browser.browserAction.setIcon({ path });
  }

  onClick(listener) {
    browser.browserAction.onClicked.addListener(listener);
  }
}