-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
23 lines (18 loc) · 833 Bytes
/
index.js
File metadata and controls
23 lines (18 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const toggleDisableForceDownload = document.getElementById('toggleDisableForceDownload');
chrome.storage.local.get(['disableForceDownload'], (result) => {
if (result.disableForceDownload !== undefined) {
toggleDisableForceDownload.checked = result.disableForceDownload;
}
});
toggleDisableForceDownload.addEventListener('change', () => {
chrome.storage.local.set({ disableForceDownload: toggleDisableForceDownload.checked });
});
const toggleOpenInNewTab = document.getElementById('toggleOpenInNewTab');
chrome.storage.local.get(['openInNewTab'], (result) => {
if (result.openInNewTab !== undefined) {
toggleOpenInNewTab.checked = result.openInNewTab;
}
});
toggleOpenInNewTab.addEventListener('change', () => {
chrome.storage.local.set({ openInNewTab: toggleOpenInNewTab.checked });
});