about summary refs log tree commit diff stats
path: root/src/pages/options/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/options/widgets')
-rw-r--r--src/pages/options/widgets/general.js9
-rw-r--r--src/pages/options/widgets/general.pug2
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__")