aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-06-09 17:40:17 +0200
committer0neGal <mail@0negal.com>2024-06-09 17:40:17 +0200
commit6b3048fc7c051b8e5734e02af166edfbadd8af0b (patch)
treec43a051a3c66f0e2355cb290876ac230a59192b8
parentaa7f589553787328c1c9cd20e6d798e6b4d16d3e (diff)
downloadViper-6b3048fc7c051b8e5734e02af166edfbadd8af0b.tar.gz
Viper-6b3048fc7c051b8e5734e02af166edfbadd8af0b.zip
fixed things in the settings popup not loading
-rw-r--r--src/app/js/settings.js12
1 files 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 {