avm99963 | 6d9c5fe | 2019-06-04 00:35:53 +0200 | [diff] [blame] | 1 | chrome.storage.sync.get(null, function(items) { |
avm99963 | 6c7920f | 2020-07-14 18:18:20 +0200 | [diff] [blame] | 2 | if (items.loaddrafts || items.batchduplicate) { |
avm99963 | 6d9c5fe | 2019-06-04 00:35:53 +0200 | [diff] [blame] | 3 | var startup = JSON.parse(document.querySelector("html").getAttribute("data-startup")); |
avm99963 | c19497f | 2019-08-23 00:15:11 +0200 | [diff] [blame] | 4 | |
| 5 | if (items.loaddrafts) { |
| 6 | startup[4][13] = true; |
| 7 | } |
| 8 | |
avm99963 | 6c7920f | 2020-07-14 18:18:20 +0200 | [diff] [blame] | 9 | if (items.batchduplicate) { |
| 10 | startup[4][58] = true; |
| 11 | } |
| 12 | |
avm99963 | 6d9c5fe | 2019-06-04 00:35:53 +0200 | [diff] [blame] | 13 | document.querySelector("html").setAttribute("data-startup", JSON.stringify(startup)); |
| 14 | } |
| 15 | }); |