diff options
author | Hygna <hygna@proton.me> | 2022-09-25 17:27:43 +0100 |
---|---|---|
committer | Hygna <hygna@proton.me> | 2022-09-25 17:27:43 +0100 |
commit | 03f242fe11091455b717168a5221c14e84779988 (patch) | |
tree | 3683560d9cb574c7e07c700bd29b2646f905f4ba /src/pages/popup/popup.js | |
parent | Fix some error in runtime.onInstalled (diff) | |
download | libredirect-03f242fe11091455b717168a5221c14e84779988.zip |
Started work on instance switching
Diffstat (limited to 'src/pages/popup/popup.js')
-rw-r--r-- | src/pages/popup/popup.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pages/popup/popup.js b/src/pages/popup/popup.js index a2e001d3..fce451cb 100644 --- a/src/pages/popup/popup.js +++ b/src/pages/popup/popup.js @@ -69,12 +69,12 @@ function getEnabled() { }) } -browser.storage.local.get("popupFrontends", r => { +browser.storage.local.get("popupServices", r => { browser.tabs.query({ active: true, currentWindow: true }, async tabs => { - for (const frontend of generalHelper.allPopupFrontends) { - if (!r.popupFrontends.includes(frontend)) allSites.getElementsByClassName(frontend)[0].classList.add("hide") - else allSites.getElementsByClassName(frontend)[0].classList.remove("hide") - currSite.getElementsByClassName(frontend)[0].classList.add("hide") + for (const service in config.services) { + if (!r.popupServices.includes(service)) allSites.getElementsByClassName(service)[0].classList.add("hide") + else allSites.getElementsByClassName(service)[0].classList.remove("hide") + currSite.getElementsByClassName(service)[0].classList.add("hide") } await getEnabled() |