2026-11-26 08:44:15 +00:00
|
|
|
function startTimers() {
|
|
|
|
|
const moving = () => relayout(MOVE);
|
|
|
|
|
const liveSky = () => live() && drawSky();
|
|
|
|
|
const whileShown = (task) => () => document.hidden || task();
|
|
|
|
|
document.addEventListener("visibilitychange", () => document.hidden || [moving, syncRadio].forEach((task) => task()));
|
|
|
|
|
window.setInterval(poll, 10000);
|
|
|
|
|
window.setInterval(follow, 3000);
|
2026-11-28 01:47:41 +00:00
|
|
|
window.setInterval(whileShown(watchClosed), CLOSED_POLL);
|
2026-11-26 08:44:15 +00:00
|
|
|
window.setInterval(whileShown(moving), RELAYOUT);
|
|
|
|
|
window.setInterval(whileShown(liveSky), 30000);
|
|
|
|
|
window.setInterval(syncRadio, 20000);
|
|
|
|
|
window.setInterval(whileShown(() => tree.dom && fetchTree()), 60000);
|
|
|
|
|
}
|