diff options
author | GitExample <git@example.com> | 2022-02-03 23:03:33 +0100 |
---|---|---|
committer | GitExample <git@example.com> | 2022-02-03 23:04:41 +0100 |
commit | 5884b9a8e91ed8b2c5cfea90afa2709697b05afb (patch) | |
tree | fc61ff6c9791b7f350a022eef036165b7413e6bd /src/app/browser.js | |
parent | be4dc389305ad203328188c2b88383871916ebe0 (diff) | |
download | Viper-5884b9a8e91ed8b2c5cfea90afa2709697b05afb.tar.gz Viper-5884b9a8e91ed8b2c5cfea90afa2709697b05afb.zip |
detection for new updates of mods
Diffstat (limited to 'src/app/browser.js')
-rw-r--r-- | src/app/browser.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app/browser.js b/src/app/browser.js index b387a6a..dda0441 100644 --- a/src/app/browser.js +++ b/src/app/browser.js @@ -95,8 +95,17 @@ function BrowserEl(properties) { } let installstr = lang("gui.browser.install"); + if (normalize(modsdiv.innerText.split("\n")).includes(normalize(properties.title))) { installstr = lang("gui.browser.reinstall"); + + for (let i = 0; i < modsobj.all.length; i++) { + if (normalize(modsobj.all[i].Name) == normalize(properties.title) + && "v" + modsobj.all[i].Version != properties.version) { + + installstr = lang("gui.browser.update"); + } + } } browserEntries.innerHTML += ` |