From a5620cb9c4d3570cf5ce2abe8772ef4e3b91bd76 Mon Sep 17 00:00:00 2001 From: kory Date: Thu, 1 Oct 2026 23:37:45 +0800 Subject: [PATCH] fix(panel): resolve duplicate polling timer declaration causing JS execution failure --- internal/web/static/app.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/internal/web/static/app.js b/internal/web/static/app.js index 8f1eef2..62b6571 100644 --- a/internal/web/static/app.js +++ b/internal/web/static/app.js @@ -384,21 +384,3 @@ document.addEventListener("visibilitychange", () => { } }); loadWebhooks().catch(console.error); - -// 开启 5 秒平滑实时自动轮询 -let devicePollTimer = null; -function startDevicePolling() { - if (devicePollTimer) clearInterval(devicePollTimer); - devicePollTimer = setInterval(() => { - if (!document.hidden) { - loadDevices().catch(console.error); - } - }, 5000); -} -startDevicePolling(); - -document.addEventListener("visibilitychange", () => { - if (!document.hidden) { - loadDevices().catch(console.error); - } -});