aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBobIsMyManager <bimmgitsignature.nly8m@simplelogin.co>2022-07-23 14:55:26 +0100
committerBobIsMyManager <bimmgitsignature.nly8m@simplelogin.co>2022-07-23 14:55:26 +0100
commit799b8e3bdfff7ac32f66eba29052b4b2764ac0fa (patch)
tree31919e91e848151081baefbef076a3261c882a20
parentResolve redirects for neuters and youtube (diff)
downloadlibredirect-799b8e3bdfff7ac32f66eba29052b4b2764ac0fa.zip
Resolve protocolFallback checkbox value not being displayed correctly
-rw-r--r--src/pages/options/index.html4
-rw-r--r--src/pages/options/widgets/general.js9
-rw-r--r--src/pages/options/widgets/general.pug2
3 files changed, 8 insertions, 7 deletions
diff --git a/src/pages/options/index.html b/src/pages/options/index.html
index 8eb3c21b..96b8d553 100644
--- a/src/pages/options/index.html
+++ b/src/pages/options/index.html
@@ -86,8 +86,8 @@
</div>
<div id="protocol-fallback">
<div class="some-block option-block">
- <h4 data-localise="__MSG_protocolFallback__">Fallback to normal if no frontends are available for the current protocol</h4>
- <input id="protocol-fallback" type="checkbox">
+ <h4 data-localise="__MSG_protocolFallback__">Fallback to normal if no instances are available for the current protocol</h4>
+ <input id="protocol-fallback-checkbox" type="checkbox">
</div>
</div>
<div class="some-block option-block">
diff --git a/src/pages/options/widgets/general.js b/src/pages/options/widgets/general.js
index 106bd532..0f7a3140 100644
--- a/src/pages/options/widgets/general.js
+++ b/src/pages/options/widgets/general.js
@@ -169,8 +169,8 @@ protocolElement.addEventListener("change", event => {
location.reload();
})
-let protocolFallbackElement = document.getElementById("protocol-fallback")
-protocolFallbackElement.addEventListener("change", event => {
+let protocolFallbackCheckbox = document.getElementById("protocol-fallback-checkbox")
+protocolFallbackCheckbox.addEventListener("change", event => {
browser.storage.local.set({ protocolFallback: event.target.checked});
})
@@ -208,9 +208,10 @@ browser.storage.local.get(
autoRedirectElement.checked = r.autoRedirect;
themeElement.value = r.theme;
protocolElement.value = r.protocol;
- protocolFallbackElement.checked = r.protocolFallback;
+ protocolFallbackCheckbox.checked = r.protocolFallback;
// firstPartyIsolate.checked = r.firstPartyIsolate;
-
+
+ let protocolFallbackElement = document.getElementById('protocol-fallback')
if (protocolElement.value == "normal") {
protocolFallbackElement.style.display = 'none';
} else {
diff --git a/src/pages/options/widgets/general.pug b/src/pages/options/widgets/general.pug
index 11fbd0f9..e04e9e2a 100644
--- a/src/pages/options/widgets/general.pug
+++ b/src/pages/options/widgets/general.pug
@@ -25,7 +25,7 @@ section#general_page.option-block
#protocol-fallback
.some-block.option-block
h4(data-localise="__MSG_protocolFallback__") Fallback to normal if no instances are available for the current protocol
- input#protocol-fallback(type="checkbox")
+ input#protocol-fallback-checkbox(type="checkbox")
.some-block.option-block
h4(data-localise="__MSG_autoRedirect__")