mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-11-24 00:13:28 +00:00
fix: run script after document is ready (#25)
* Wait until document ready before main * More robust ready state handling Co-authored-by: alistair3149 <alistair3149@users.noreply.github.com>
This commit is contained in:
parent
13c55e9403
commit
e54a313de4
|
@ -374,4 +374,10 @@ function main() {
|
|||
}
|
||||
}
|
||||
|
||||
main();
|
||||
if ( document.readyState === 'interactive' || document.readyState === 'complete' ) {
|
||||
main();
|
||||
} else {
|
||||
document.addEventListener( 'DOMContentLoaded', function () {
|
||||
main();
|
||||
} );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue