This commit is contained in:
the-djmaze 2022-04-05 11:43:23 +02:00
parent 8c8c414bda
commit 873c9ebd8c

View file

@ -51,7 +51,18 @@ window.rl = {
loadScript(url)
.then(() => loadScript(url.replace('/libs.', `/${admin?'admin':'app'}.`)))
.then(() => appData.PluginsLink ? loadScript(appData.PluginsLink) : Promise.resolve())
.then(() => ('complete' == doc.readyState) ? cb() : doc.addEventListener('DOMContentLoaded', cb))
.then(() => {
if ('complete' == doc.readyState) {
cb();
} else {
let poll = setInterval(()=>{
if ('complete' == doc.readyState) {
clearInterval(poll);
cb();
}
}, 50);
}
})
.catch(e => {
showError(e.message);
throw e;