aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages
diff options
context:
space:
mode:
authorHygna <hygna@proton.me>2022-10-02 16:44:11 +0100
committerHygna <hygna@proton.me>2022-10-02 16:44:11 +0100
commit6c8c304a0d7c0941fba36c3c765634a7d443cd1a (patch)
tree482ebbff9ff0d80709428e70c3ebc384c0e5181b /src/pages
parentsmall fix (diff)
downloadlibredirect-6c8c304a0d7c0941fba36c3c765634a7d443cd1a.zip
Corrected minor mistake
Diffstat (limited to '')
-rw-r--r--src/pages/popup/popup.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pages/popup/popup.js b/src/pages/popup/popup.js
index 9231f3f5..05dd70f7 100644
--- a/src/pages/popup/popup.js
+++ b/src/pages/popup/popup.js
@@ -58,7 +58,7 @@ const currentSiteIsFrontend = document.getElementById("current_site_divider")
browser.storage.local.get("options", r => {
browser.tabs.query({ active: true, currentWindow: true }, async tabs => {
-for (const service in config.services) {
+ for (const service in config.services) {
if (!r.options.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")
@@ -68,7 +68,7 @@ for (const service in config.services) {
divs[service].toggle.all.checked = r.options[service].enabled
divs[service].toggle.current.checked = r.options[service].enabled
}
-
+
let url
try {
url = new URL(tabs[0].url)
@@ -77,13 +77,13 @@ for (const service in config.services) {
document.getElementById("unify_div").style.display = "none"
return
}
-
+
let service = await serviceHelper.computeService(url, true)
let frontend
if (service) {
if (service[1]) {
frontend = service[1]
- service = frontend[0]
+ service = service[0]
}
divs[service].current.classList.remove("hide")
divs[service].all.classList.add("hide")