You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xshop/resources/js/panel/panel-window-loader.js

28 lines
530 B
JavaScript

let isWinLoaded = false;
window.addEventListener('load',function () {
if (!isWinLoaded){
forceLoad();
isWinLoaded = true;
}
});
setTimeout(function () {
if (!isWinLoaded){
forceLoad();
isWinLoaded = true;
}
},5000);
const forceLoad = function () {
try {
const preloader = document.querySelector('#panel-preloader');
preloader.style.height = 0;
setTimeout( () => {
preloader.style.display = 'none';
},500);
} catch {
}
};