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
window.onload = function() {
document.body.style.margin = 0;
document.body.appendChild(loadingScreen);
startAnimation();
if (!animationInterval) {
document.body.appendChild(loadingScreen);
startAnimation();
}
};
// IE8 does not call onload if already loaded before set
document.body && window.onload();

View file

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