15 lines
353 B
JavaScript
15 lines
353 B
JavaScript
window.updateLoop = [];
|
|
|
|
(() => {
|
|
let updLoop = setInterval(() => {
|
|
updateLoop.forEach(f => f());
|
|
}, 30000);
|
|
|
|
let everythingLoaded = setInterval(function() {
|
|
if (/loaded|complete/.test(document.readyState)) {
|
|
clearInterval(everythingLoaded);
|
|
updateLoop.forEach(f => f());
|
|
}
|
|
}, 10);
|
|
})();
|
|
|