diff options
author | BobIsMyManager <bimmgitsignature.nly8m@simplelogin.co> | 2022-07-23 14:55:26 +0100 |
---|---|---|
committer | BobIsMyManager <bimmgitsignature.nly8m@simplelogin.co> | 2022-07-23 14:55:26 +0100 |
commit | 799b8e3bdfff7ac32f66eba29052b4b2764ac0fa (patch) | |
tree | 31919e91e848151081baefbef076a3261c882a20 /src/pages/options/widgets | |
parent | Resolve redirects for neuters and youtube (diff) | |
download | libredirect-799b8e3bdfff7ac32f66eba29052b4b2764ac0fa.zip |
Resolve protocolFallback checkbox value not being displayed correctly
Diffstat (limited to 'src/pages/options/widgets')
-rw-r--r-- | src/pages/options/widgets/general.js | 9 | ||||
-rw-r--r-- | src/pages/options/widgets/general.pug | 2 |
2 files changed, 6 insertions, 5 deletions
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__") |