Remove the domReady madness, use DOMContentLoaded event like in global.js

This commit is contained in:
Alexandre Aubin 2019-02-22 20:12:25 +01:00
parent 7fa5b91297
commit 2646db9ea2

View file

@ -194,20 +194,11 @@ function make_element_draggable(id) {
});
};
/* Smallest DOMReady
http://dustindiaz.com/smallest-domready-ever
-------------------------- */
function domReady(cb) {
/in/.test(document.readyState) // in = loadINg
? setTimeout('domReady('+cb+')', 9)
: cb();
}
/* ----------------------------------------------------------
Main
---------------------------------------------------------- */
domReady(function(){
document.addEventListener('DOMContentLoaded', function() {
// Don't do this in iframe
if (window.self !== window.top) {return false;}