about summary refs log tree commit diff stats
path: root/src/pages/popup
diff options
context:
space:
mode:
authorHygna <hygna@proton.me>2022-09-28 20:18:32 +0100
committerHygna <hygna@proton.me>2022-09-28 20:18:32 +0100
commit800d0cbd9fd4286f0affcb5a28f01f03532655fb (patch)
tree4cc267629d8b7ff4656e83f71d17c2e102b09240 /src/pages/popup
parentStarted converting storage format (diff)
downloadlibredirect-800d0cbd9fd4286f0affcb5a28f01f03532655fb.zip
Unify cookies
Diffstat (limited to 'src/pages/popup')
-rw-r--r--src/pages/popup/popup.html2
-rw-r--r--src/pages/popup/popup.js10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/pages/popup/popup.html b/src/pages/popup/popup.html
index e21a63a0..d52a34b6 100644
--- a/src/pages/popup/popup.html
+++ b/src/pages/popup/popup.html
@@ -241,7 +241,7 @@
         <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
           <path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path>
         </svg></a></div>
-    <div class="some-block" id="unify_div" title="Unify cookies across all selected instances"><a class="title button prevent" id="unify">
+    <div class="some-block" id="unify_div" title="Unify preferences across all selected instances"><a class="title button prevent" id="unify">
         <h4 data-localise="__MSG_unifySettings__">Unify Settings</h4>
         <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
           <path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path>
diff --git a/src/pages/popup/popup.js b/src/pages/popup/popup.js
index 098ae01a..5a5ccb53 100644
--- a/src/pages/popup/popup.js
+++ b/src/pages/popup/popup.js
@@ -78,11 +78,11 @@ browser.storage.local.get("options", r => {
 			return
 		}
 
-		const currentService = serviceHelper.computeService(url)
-		if (currentService != null) {
-			divs[currentService].current.classList.remove("hide")
-			divs[currentService].all.classList.add("hide")
-			if (config.services[currentService].preferences != undefined) {
+		const [service, frontend] = serviceHelper.computeService(url, true)
+		if (service) {
+			divs[service].current.classList.remove("hide")
+			divs[service].all.classList.add("hide")
+			if (config.services[service].frontends[frontend].preferences) {
 				const unify = document.getElementById("unify")
 				const textElement = document.getElementById("unify").getElementsByTagName("h4")[0]
 				unify.addEventListener("click", () => {