From 936e84f6e0caa7f3c741268995f10adb6081d3b2 Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Fri, 22 Mar 2024 16:44:48 +0300 Subject: [PATCH] feat(index.html): implement auto-reload functionality every 5 seconds --- www/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/index.html b/www/index.html index 4e4f9992..610f033a 100644 --- a/www/index.html +++ b/www/index.html @@ -143,6 +143,9 @@ }); } + // Auto-reload every 5 seconds + setInterval(reload, 5000); + const url = new URL('api', location.href); fetch(url, {cache: 'no-cache'}).then(r => r.json()).then(data => { const info = document.querySelector('.info');