web/public/obj/js/updateLoop.js

16 lines
353 B
JavaScript
Raw Permalink Normal View History

2023-10-16 01:36:02 +02:00
window.updateLoop = [];
(() => {
let updLoop = setInterval(() => {
updateLoop.forEach(f => f());
2023-10-16 01:36:02 +02:00
}, 30000);
2023-10-16 01:36:02 +02:00
let everythingLoaded = setInterval(function() {
if (/loaded|complete/.test(document.readyState)) {
clearInterval(everythingLoaded);
updateLoop.forEach(f => f());
}
}, 10);
})();