-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhn.js
24 lines (22 loc) · 771 Bytes
/
hn.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const openT = document.getElementById("openT");
chrome.storage.local.get({'newTabsOn': true}, data => {
if (data.newTabsOn) openT.checked = true;
else openT.checked = false;
});
openT.addEventListener('change', e => {
if (openT.checked)
chrome.storage.local.set({'newTabsOn': true});
else
chrome.storage.local.set({'newTabsOn': false});
});
const favicons = document.getElementById("favicons");
chrome.storage.local.get({'faviconsOn': false}, data => {
if (data.faviconsOn) favicons.checked = true;
else favicons.checked = false;
});
favicons.addEventListener('change', e => {
if (favicons.checked)
chrome.storage.local.set({'faviconsOn': true});
else
chrome.storage.local.set({'faviconsOn': false});
});