mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Remove the domReady madness, use DOMContentLoaded event like in global.js
This commit is contained in:
parent
7fa5b91297
commit
2646db9ea2
1 changed files with 2 additions and 11 deletions
|
@ -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;}
|
||||
|
||||
|
|
Loading…
Reference in a new issue