blob: 8d0f411be69f546f9cc90261a8b881c33f87ea6c [file] [log] [blame]
avm999633a4946d2021-02-05 21:27:12 +01001// IMPORTANT: keep this file in sync with sw.js
2
avm999634c1a6792020-08-31 21:30:42 +02003// When the extension gets updated, set new options to their default value.
avm99963122dc9b2019-03-30 18:44:18 +01004chrome.runtime.onInstalled.addListener(function(details) {
avm99963b69eb3d2020-08-20 02:03:44 +02005 if (details.reason == 'install' || details.reason == 'update') {
avm999634c1a6792020-08-31 21:30:42 +02006 chrome.storage.sync.get(null, function(options) {
avm99963bf8eece2021-04-22 00:27:03 +02007 cleanUpOptions(options, false);
avm999634c1a6792020-08-31 21:30:42 +02008 });
avm99963122dc9b2019-03-30 18:44:18 +01009 }
avm99963cbea3142019-03-28 00:48:15 +010010});
avm999631a1d2b72020-08-20 03:15:20 +020011
12chrome.browserAction.onClicked.addListener(function() {
13 chrome.runtime.openOptionsPage();
14});