(()=>{"use strict";!function(){async function t(t){var s=t.classList.contains("settings_toggle")?t.classList.contains("off"):parseInt(t.value);await chrome.storage.local.set({[t.dataset.settings]:s}),t.classList.contains("settings_toggle")&&(t.classList.remove("on","off"),t.classList.add(s?"on":"off"))}function s(){const s=document.getElementsByClassName("settings_toggle"),e=document.getElementsByClassName("settings_text");chrome.storage.local.get(null,(async n=>{for(const e of s)e.classList.remove("on","off"),e.classList.add(n[e.dataset.settings]?"on":"off"),e.addEventListener("click",(()=>t(e)));for(const s of e)s.value=n[s.dataset.settings],s.addEventListener("input",(()=>t(s)))}))}document.addEventListener("DOMContentLoaded",s)}()})();