From 129c190b84d06351cd0a8f4c76f4d072350e12f0 Mon Sep 17 00:00:00 2001 From: prpr Date: Fri, 29 Sep 2023 23:22:13 +0100 Subject: [PATCH] Refresh status bar every minute --- webif/html/js/topbar.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/webif/html/js/topbar.js b/webif/html/js/topbar.js index 1b43961..fe896a8 100644 --- a/webif/html/js/topbar.js +++ b/webif/html/js/topbar.js @@ -22,7 +22,6 @@ setInterval(updateidle, 60000); if ($('#vfd').length) { - function updatevfd() { $.get('/cgi-bin/vfd.jim', function(vfd) { @@ -34,5 +33,18 @@ if ($('#vfd').length) setInterval(updatevfd, 5000); } +if ($('#status_txt').length) +{ + function updatestatus() + { + $.get('/cgi-bin/status.jim', function(status) { + $('#status_txt').html(status); + }); + } + + updatestatus(); + setInterval(updatestatus, 60000); +} + });