Watch-on-LBRY/scripts/browserActionOnClicked.js
Yamboy1 464150afac See commit desc.
Big changes here.
- I've moved all of the scripts to individual
files in the `scripts` folder.
- I've updated all the code to ES7.
- The extension stores the state in browser
storage now, and it persists.
- The extension has a default state of on.
2020-01-11 23:07:55 +13:00

5 lines
171 B
JavaScript

chrome.browserAction.onClicked.addListener(() => {
chrome.storage.local.get('enabled', ({ enabled }) => {
chrome.storage.local.set({ enabled: !enabled });
});
});