-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.js
More file actions
19 lines (15 loc) · 725 Bytes
/
Copy pathpopup.js
File metadata and controls
19 lines (15 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// QuickTab - Popup Settings
const showNonInjectableCheckbox = document.getElementById('showNonInjectable');
const stickyModeCheckbox = document.getElementById('stickyMode');
// Load saved settings
chrome.storage.local.get(['showNonInjectableTabs', 'stickyMode'], (result) => {
showNonInjectableCheckbox.checked = result.showNonInjectableTabs || false;
stickyModeCheckbox.checked = result.stickyMode || false;
});
// Save on change
showNonInjectableCheckbox.addEventListener('change', () => {
chrome.storage.local.set({ showNonInjectableTabs: showNonInjectableCheckbox.checked });
});
stickyModeCheckbox.addEventListener('change', () => {
chrome.storage.local.set({ stickyMode: stickyModeCheckbox.checked });
});