diff --git a/pages/popup/popup.js b/pages/popup/popup.js index 3425370..6d4c3ff 100644 --- a/pages/popup/popup.js +++ b/pages/popup/popup.js @@ -5,6 +5,7 @@ let disableInvidious = document.querySelector("#disable-invidious"); let disableBibliogram = document.querySelector("#disable-bibliogram"); let disableOsm = document.querySelector("#disable-osm"); let disableOldReddit = document.querySelector("#disable-old-reddit"); +let disableSearchEngine = document.querySelector("#disable-searchEngine"); let version = document.querySelector("#version"); window.browser = window.browser || window.chrome; @@ -16,6 +17,7 @@ browser.storage.sync.get( "disableBibliogram", "disableOsm", "disableOldReddit", + "disableSearchEngine", "theme", ], (result) => { @@ -25,6 +27,7 @@ browser.storage.sync.get( disableBibliogram.checked = !result.disableBibliogram; disableOsm.checked = !result.disableOsm; disableOldReddit.checked = !result.disableOldReddit; + disableSearchEngine.checked = !result.disableSearchEngine; } ); @@ -50,6 +53,10 @@ disableOldReddit.addEventListener("change", (event) => { browser.storage.sync.set({ disableOldReddit: !event.target.checked }); }); +disableSearchEngine.addEventListener("change", (event) => { + browser.storage.sync.set({ disableSearchEngine: !event.target.checked }); +}); + document.querySelector("#more-options").addEventListener("click", () => { browser.runtime.openOptionsPage(); });