From 32f4e5e1436ef5ba0faa466b03fbde2bb870fdc5 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Sat, 5 Feb 2022 18:31:55 +0100 Subject: 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. --- src/app/browser.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/app') 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() -- cgit v1.2.3