don't start animation twice

This commit is contained in:
j 2019-01-31 16:52:27 +05:30
parent 81543edab2
commit 0062191db4
2 changed files with 8 additions and 4 deletions

View file

@ -287,8 +287,10 @@
// FF3.6 document.body can be undefined here // FF3.6 document.body can be undefined here
window.onload = function() { window.onload = function() {
document.body.style.margin = 0; document.body.style.margin = 0;
if (!animationInterval) {
document.body.appendChild(loadingScreen); document.body.appendChild(loadingScreen);
startAnimation(); startAnimation();
}
}; };
// IE8 does not call onload if already loaded before set // IE8 does not call onload if already loaded before set
document.body && window.onload(); document.body && window.onload();

View file

@ -121,8 +121,10 @@
// FF3.6 document.body can be undefined here // FF3.6 document.body can be undefined here
window.onload = function() { window.onload = function() {
document.body.style.margin = 0; document.body.style.margin = 0;
if (!animationInterval) {
document.body.appendChild(loadingScreen); document.body.appendChild(loadingScreen);
startAnimation(); startAnimation();
}
}; };
// IE8 does not call onload if already loaded before set // IE8 does not call onload if already loaded before set
document.body && window.onload(); document.body && window.onload();