diff --git a/options/mzta-options.html b/options/mzta-options.html index aad89782..5865e34f 100644 --- a/options/mzta-options.html +++ b/options/mzta-options.html @@ -7,7 +7,8 @@
Release Notes

- __MSG_AlwaysLinkOptionText__
+
+

__MSG_prefsInfoTitle__

__MSG_prefsInfoDesc_1__
diff --git a/options/mzta-options.js b/options/mzta-options.js index cd1cbe74..90c42efa 100644 --- a/options/mzta-options.js +++ b/options/mzta-options.js @@ -1,7 +1,8 @@ function saveOptions(e) { e.preventDefault(); let options = {}; - document.querySelectorAll(".option-input").forEach(element => { + let element = e.target; + switch (element.type) { case 'checkbox': options[element.id] = element.checked; @@ -19,7 +20,7 @@ function saveOptions(e) { console.log('Unhandled input type:', element.type); } } - }); + browser.storage.sync.set(options); }