From 1d4c61f4afd8a78d08a0a0504a1b799f6abb73ce Mon Sep 17 00:00:00 2001 From: Yumi Izumi Date: Sun, 8 Nov 2020 23:58:22 +0900 Subject: [PATCH] Update popup.js --- pages/popup/popup.js | 7 +++++++ 1 file changed, 7 insertions(+) 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(); });