Files
gpw_next/GPW.CORE6.Smart/wwwroot/lib/offlineOverlay.js
T
2024-08-22 16:03:31 +02:00

15 lines
414 B
JavaScript

const overlay = document.getElementById('offline-overlay');
const stopJS = document.getElementById('stopJS');
const heartbeat = () => {
overlay.classList.remove("animate-overlay");
void overlay.offsetWidth;
overlay.classList.add("animate-overlay");
}
const heartbeatInterval = setInterval(heartbeat, 1000);
stopJS.addEventListener("click", function () {
clearInterval(heartbeatInterval);
});