blob: 2f181cbeecb5a69dfb3d03b097048ce3095c3ef7 [file] [log] [blame]
avm999633a4946d2021-02-05 21:27:12 +01001// IMPORTANT: keep this file in sync with background.js
2
avm99963bbc88c62020-12-25 03:44:41 +01003importScripts('common/common.js')
4
5// When the extension gets updated, set new options to their default value.
6chrome.runtime.onInstalled.addListener(details => {
7 if (details.reason == 'install' || details.reason == 'update') {
8 chrome.storage.sync.get(null, options => {
avm99963bf8eece2021-04-22 00:27:03 +02009 cleanUpOptions(options, false);
avm99963bbc88c62020-12-25 03:44:41 +010010 });
11 }
12});
13
14chrome.action.onClicked.addListener(_ => {
15 chrome.runtime.openOptionsPage();
16});