avm99963 | bbc88c6 | 2020-12-25 03:44:41 +0100 | [diff] [blame] | 1 | importScripts('common/common.js') |
2 | |||||
3 | // When the extension gets updated, set new options to their default value. | ||||
4 | chrome.runtime.onInstalled.addListener(details => { | ||||
5 | if (details.reason == 'install' || details.reason == 'update') { | ||||
6 | chrome.storage.sync.get(null, options => { | ||||
7 | cleanUpOptions(options); | ||||
8 | }); | ||||
9 | } | ||||
10 | }); | ||||
11 | |||||
12 | chrome.action.onClicked.addListener(_ => { | ||||
13 | chrome.runtime.openOptionsPage(); | ||||
14 | }); |