commit df58ae98fd26b3a03eb86f30b253f586aee8b471 parent c12f711075c6a3d8c131c6fe6a84be347b23723f Author: JayVii <jayvii[AT]posteo[DOT]de> Date: Mon, 21 Oct 2024 17:26:12 +0200 feat: refresh streams every 5 minutes automatically Diffstat:
M | assets/js/twitch.js | | | 9 | +++++++++ |
M | index.php | | | 2 | +- |
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/assets/js/twitch.js b/assets/js/twitch.js @@ -198,3 +198,12 @@ function tw2html_reload() { } } + +function tw2html_daemon() { + + // Run reload function initially + tw2html_reload(); + + // Recall daemon function after 5 minutes + setTimeout(tw2html_daemon, 60 * 5 * 1000); +} diff --git a/index.php b/index.php @@ -51,7 +51,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> - <body onload="tw2html_reload();"> + <body onload="tw2html_daemon();"> <header> <!-- Buttons -->