aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-02-08 21:26:42 +0100
committer0neGal <mail@0negal.com>2022-02-08 21:26:42 +0100
commit0de9a3a8d6d7223f3f06ab13e1afe1ff926b5334 (patch)
tree618054ab446fe436d8e5f3f077c8b43f2e637706 /src
parentfd34a8ba14d2753612aac3813be4d850a4c56765 (diff)
downloadViper-0de9a3a8d6d7223f3f06ab13e1afe1ff926b5334.tar.gz
Viper-0de9a3a8d6d7223f3f06ab13e1afe1ff926b5334.zip
Thunderstore mods are only loaded when requested
Before this commit, the Thunderstore request would be sent on application startup, now instead, it only does it when someone actually clicks the "Find Mods" button, which should intern decrease load on Thunderstore's end. Not that it mattered in the grand scheme of things, it was just sort of unneeded.
Diffstat (limited to 'src')
-rw-r--r--src/app/browser.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/app/browser.js b/src/app/browser.js
index 5062d86..f974be0 100644
--- a/src/app/browser.js
+++ b/src/app/browser.js
@@ -5,6 +5,7 @@ var packages = [];
var Browser = {
maxentries: 50,
toggle: (state) => {
+ Browser.loadfront();
if (state) {
browser.scrollTo(0, 0);
overlay.classList.add("shown")
@@ -98,7 +99,7 @@ var Browser = {
}, 1501)
}
}
-}; Browser.loadfront()
+}
document.body.addEventListener("keyup", (e) => {
if (e.key == "Escape") {Browser.toggle(false)}