mirror of
https://github.com/SimonBrazell/privacy-redirect
synced 2025-01-10 15:56:18 +01:00
745c5babcf
- Closes #69 - Closes #70 - Fixes #71 - Closes #72 - added fr l10n - Fixes #73 - Implement additional Invidious params (#66)
47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
'use strict';
|
|
|
|
let disableNitter = document.querySelector('#disable-nitter');
|
|
let disableInvidious = document.querySelector('#disable-invidious');
|
|
let disableBibliogram = document.querySelector('#disable-bibliogram');
|
|
let disableOsm = document.querySelector('#disable-osm');
|
|
let version = document.querySelector('#version');
|
|
|
|
window.browser = window.browser || window.chrome;
|
|
|
|
browser.storage.sync.get(
|
|
[
|
|
'disableNitter',
|
|
'disableInvidious',
|
|
'disableBibliogram',
|
|
'disableOsm'
|
|
],
|
|
result => {
|
|
disableNitter.checked = !result.disableNitter;
|
|
disableInvidious.checked = !result.disableInvidious;
|
|
disableBibliogram.checked = !result.disableBibliogram;
|
|
disableOsm.checked = !result.disableOsm;
|
|
}
|
|
);
|
|
|
|
version.textContent = browser.runtime.getManifest().version;
|
|
|
|
disableNitter.addEventListener('change', event => {
|
|
browser.storage.sync.set({ disableNitter: !event.target.checked });
|
|
});
|
|
|
|
disableInvidious.addEventListener('change', event => {
|
|
browser.storage.sync.set({ disableInvidious: !event.target.checked });
|
|
});
|
|
|
|
disableBibliogram.addEventListener('change', event => {
|
|
browser.storage.sync.set({ disableBibliogram: !event.target.checked });
|
|
});
|
|
|
|
disableOsm.addEventListener('change', event => {
|
|
browser.storage.sync.set({ disableOsm: !event.target.checked });
|
|
});
|
|
|
|
document.querySelector('#more-options').addEventListener('click', () => {
|
|
browser.runtime.openOptionsPage();
|
|
});
|