From 0de9a3a8d6d7223f3f06ab13e1afe1ff926b5334 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Tue, 8 Feb 2022 21:26:42 +0100 Subject: 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. --- src/app/browser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)} -- cgit v1.2.3