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