avm99963 | cbea314 | 2019-03-28 00:48:15 +0100 | [diff] [blame] | 1 | function isEmpty(obj) { |
2 | return Object.keys(obj).length === 0; | ||||
3 | } | ||||
4 | |||||
5 | chrome.runtime.onInstalled.addListener(function(details) { | ||||
6 | chrome.storage.sync.get(null, function(items) { | ||||
avm99963 | 17e3e70 | 2019-03-28 01:27:39 +0100 | [diff] [blame] | 7 | if (isEmpty(items)) { |
8 | chrome.storage.sync.set({"list": true, "thread": true}); | ||||
avm99963 | cbea314 | 2019-03-28 00:48:15 +0100 | [diff] [blame] | 9 | } |
10 | }); | ||||
11 | }); |