From 309d8698d45245aa8b77e0585b76a79f5df97e4e Mon Sep 17 00:00:00 2001 From: Jon <134811123+jonsmy@users.noreply.github.com> Date: Sun, 25 Feb 2024 22:39:22 +0000 Subject: [PATCH] thread_autoupdater.js: fix tslp calc --- js/lcn/thread_autoupdater.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/js/lcn/thread_autoupdater.js b/js/lcn/thread_autoupdater.js index 18529c44..a65620cf 100644 --- a/js/lcn/thread_autoupdater.js +++ b/js/lcn/thread_autoupdater.js @@ -93,9 +93,6 @@ $().ready(() => { } LCNSite.INSTANCE.setUnseen(LCNSite.INSTANCE.getUnseen() + missingPCList.length) - secondsCounter = 11 - } else { - updateSecondsByTSLP(lastPostC.getContent().getInfo()) } } else if (res.status == 404) { threadState = String(res.status) @@ -128,15 +125,14 @@ $().ready(() => { } const threadEl = thread.getElement() - statUniqueIPs.innerText = threadStats.unique_ips statReplies.innerText = thread.getReplies().length statFiles.innerText = threadEl.querySelectorAll(".files .file").length - threadEl.querySelectorAll(".files .file .post-image.deleted").length statPage.innerText = threadStats.page + 1 + updateSecondsByTSLP(thread.getReplies().at(-1).getInfo()) } catch (error) { console.error("threadAutoUpdater: Failed while processing update. Probably a network error", error) - } finally { - secondsCounter = secondsCounter > 0 ? secondsCounter : 60 + secondsCounter = 60 } }