загрузка сервиса и рандом

This commit is contained in:
Калугин Олег Александрович
2026-02-22 08:26:12 +00:00
committed by GitVerse
parent 01238e93d9
commit 97609b3ba7
3 changed files with 896 additions and 18 deletions

29
public/loading-end.js Normal file
View File

@@ -0,0 +1,29 @@
// loading-end.js - Загружается последним
(function() {
// Отмечаем, что скрипт загружен
if (window.loadingScripts) {
window.loadingScripts.loaded++;
window.loadingScripts.updateProgress();
// Дополнительная проверка на ошибки загрузки
if (window.loadingScripts.errors.length > 0) {
console.warn('Некоторые скрипты не загрузились:', window.loadingScripts.errors);
// Показываем предупреждение, но не блокируем интерфейс
const statusDisplay = document.getElementById('loading-status');
if (statusDisplay) {
statusDisplay.innerHTML = '<span class="status-icon">⚠️</span> Загружено с предупреждениями';
statusDisplay.style.color = '#ffd700';
}
}
}
// Проверяем, что все скрипты действительно загружены
setTimeout(() => {
if (window.loadingScripts && window.loadingScripts.loaded < window.loadingScripts.total) {
// Принудительно завершаем загрузку через 10 секунд
window.loadingScripts.loaded = window.loadingScripts.total;
window.loadingScripts.updateProgress();
}
}, 10000);
})();