avm99963 | 6d9c5fe | 2019-06-04 00:35:53 +0200 | [diff] [blame] | 1 | chrome.storage.sync.get(null, function(items) { |
avm99963 | eb2d0b8 | 2019-10-07 22:58:55 +0200 | [diff] [blame^] | 2 | if (items.loaddrafts || items.escalatethreads || items.movethreads) { |
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 | |
| 9 | if (items.escalatethreads) { |
| 10 | startup[4][20] = true; |
| 11 | } |
| 12 | |
avm99963 | eb2d0b8 | 2019-10-07 22:58:55 +0200 | [diff] [blame^] | 13 | if (items.movethreads) { |
| 14 | startup[4][18] = true; |
| 15 | } |
| 16 | |
avm99963 | 6d9c5fe | 2019-06-04 00:35:53 +0200 | [diff] [blame] | 17 | document.querySelector("html").setAttribute("data-startup", JSON.stringify(startup)); |
| 18 | } |
| 19 | }); |