F12 же:
document.addEventListener("DOMContentLoaded", function (event) {
window.scrollTo(0, 0);
body = document.querySelector("body");
progressElem = document.querySelector("header .logo span");
AddClass(body, 'loading', true);
Loading();
});
function Loading(val) {
'use strict';
progress = val || progress;
if (progress < 100) {
setTimeout(function () {
progressElem.style.width = progress + "%";
if (!val) {
progress += (100 - progress) / 5;
Loading();
}
}, 1000)
} else {
setTimeout(function () {
AddClass(body, 'preload', false);
}, 2000);
setTimeout(function () {
AddClass(body, 'loading', false);
}, 3000);
}
}