From f1f279a7b3543da191d0ef8954569043a1f18d55 Mon Sep 17 00:00:00 2001 From: Brandon T Date: Mon, 24 Apr 2023 23:32:12 -0700 Subject: [PATCH] ThreadStats Purge Position Help anons who manage General threads keep track of when they need to make the next thread. --- src/Monitoring/ThreadStats.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Monitoring/ThreadStats.coffee b/src/Monitoring/ThreadStats.coffee index 4f5f58c44a..de619f841c 100644 --- a/src/Monitoring/ThreadStats.coffee +++ b/src/Monitoring/ThreadStats.coffee @@ -92,7 +92,7 @@ ThreadStats = ThreadStats.pageCountEl.textContent = 'Dead' $.addClass ThreadStats.pageCountEl, 'warning' return - ThreadStats.timeout = setTimeout ThreadStats.fetchPage, 2 * $.MINUTE + ThreadStats.timeout = setTimeout ThreadStats.fetchPage, 2 * $.MINUTE / (23 * (ThreadStats.pageCountEl.classList.contains 'warning') + 1) $.whenModified( g.SITE.urls.threadsListJSON(ThreadStats.thread), 'ThreadStats', @@ -118,6 +118,8 @@ ThreadStats = if thread.no is ThreadStats.thread.ID ThreadStats.pageCountEl.textContent = pageNum + 1 ThreadStats.pageCountEl.classList.toggle 'warning', (i >= nThreads - @response[0].threads.length) + if ThreadStats.pageCountEl.classList.contains 'warning' + ThreadStats.pageCountEl.textContent += " (" + (nThreads - i - 1) + ")" ThreadStats.lastPageUpdate = new Date(thread.last_modified * $.SECOND) ThreadStats.retry() return