From 6b3048fc7c051b8e5734e02af166edfbadd8af0b Mon Sep 17 00:00:00 2001 From: 0neGal Date: Sun, 9 Jun 2024 17:40:17 +0200 Subject: fixed things in the settings popup not loading --- src/app/js/settings.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/js/settings.js b/src/app/js/settings.js index 93d1c15..3addf0e 100644 --- a/src/app/js/settings.js +++ b/src/app/js/settings.js @@ -79,7 +79,7 @@ if (fs.existsSync("viper.json")) { // make sure config isn't empty if (Object.keys(config).length !== 0) { - // add `config` to `settings` + // add `config` to `settings_data` settings.set(config); parse_settings(); @@ -206,17 +206,17 @@ settings.popup.load = () => { continue; } - if (settings[optName] != undefined) { - switch(typeof settings[optName]) { + if (settings_data[optName] != undefined) { + switch(typeof settings_data[optName]) { case "string": - options[i].querySelector(".actions input").value = settings[optName]; + options[i].querySelector(".actions input").value = settings_data[optName]; break case "object": - options[i].querySelector(".actions input").value = settings[optName].join(" "); + options[i].querySelector(".actions input").value = settings_data[optName].join(" "); break case "boolean": let switchDiv = options[i].querySelector(".actions .switch"); - if (settings[optName]) { + if (settings_data[optName]) { switchDiv.classList.add("on"); switchDiv.classList.remove("off"); } else { -- cgit v1.2.3