From 2047fe6aadc3a9a189c50c8dd32d8e350c1a8510 Mon Sep 17 00:00:00 2001 From: Pyro Nicampt <81565698+PyroNicampt@users.noreply.github.com> Date: Thu, 2 Jan 2025 12:37:38 -0600 Subject: [PATCH] Adjust timeout length for update check --- legend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legend.js b/legend.js index 25b5903..01e8e7e 100644 --- a/legend.js +++ b/legend.js @@ -146,7 +146,7 @@ async function setLastUpdateData(){ } } - setTimeout(() => {setLastUpdateData()}, Math.min(Math.max(120000, new Date().valueOf()-updateDate.valueOf()), 7200000)); + setTimeout(() => {setLastUpdateData()}, Math.abs(new Date().valueOf()-updateDate.valueOf()) > 900000 ? 3600000 : 120000); } function populateKey(){