aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-02-05 18:31:55 +0100
committer0neGal <mail@0negal.com>2022-02-05 18:31:55 +0100
commit32f4e5e1436ef5ba0faa466b03fbde2bb870fdc5 (patch)
tree0bcbe5ada7a97748cb4cb5ed2d353cecbd956728 /src/app
parent3df0dbf5d83740e4493a561e1bab4feb5e7fc5de (diff)
downloadViper-32f4e5e1436ef5ba0faa466b03fbde2bb870fdc5.tar.gz
Viper-32f4e5e1436ef5ba0faa466b03fbde2bb870fdc5.zip
fixed edge case with folder names
If the folder name was different from the mod name it wouldn't properly update the "Install" text to "Re-Install" albeit it'd work when you reload the front.
Diffstat (limited to 'src/app')
-rw-r--r--src/app/browser.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/app/browser.js b/src/app/browser.js
index 3631550..6d10bfb 100644
--- a/src/app/browser.js
+++ b/src/app/browser.js
@@ -58,12 +58,24 @@ var Browser = {
},
setbutton: (mod, string) => {
mod = normalize(mod);
+ console.log(mod)
if (document.getElementById(mod)) {
let elems = document.querySelectorAll(`#${mod}`);
for (let i = 0; i < elems.length; i++) {
elems[i].querySelector(".text button").innerHTML = string;
}
+ } else {
+ setTimeout(() => {
+ for (let i = 0; i < modsobj.all.length; i++) {
+ let modname = normalize(modsobj.all[i].Name);
+ if (mod.includes(modname)) {
+ if (document.getElementById(modname)) {
+ Browser.setbutton(modname, string);
+ }
+ }
+ }
+ }, 1501)
}
}
}; Browser.toggle()