commento.js: allow dynamic script loading
This commit is contained in:
parent
70505c5f06
commit
9e682a964a
@ -1273,7 +1273,12 @@
|
|||||||
$(ID_LOGIN_BOX_EMAIL_INPUT).focus();
|
$(ID_LOGIN_BOX_EMAIL_INPUT).focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var mainExecuted = false;
|
||||||
function main(callback) {
|
function main(callback) {
|
||||||
|
if (mainExecuted)
|
||||||
|
return;
|
||||||
|
mainExecuted = true;
|
||||||
|
|
||||||
root = $(ID_ROOT);
|
root = $(ID_ROOT);
|
||||||
|
|
||||||
loginBoxCreate();
|
loginBoxCreate();
|
||||||
@ -1294,6 +1299,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", main);
|
document.addEventListener("domready", main);
|
||||||
|
if (document.readyState == "interactive" || document.readyState == "complete")
|
||||||
|
main();
|
||||||
|
|
||||||
}(window, document));
|
}(window, document));
|
||||||
|
Loading…
Reference in New Issue
Block a user