загрузка сервиса и рандом
This commit is contained in:
committed by
GitVerse
parent
01238e93d9
commit
97609b3ba7
29
public/loading-end.js
Normal file
29
public/loading-end.js
Normal 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);
|
||||
})();
|
||||
Reference in New Issue
Block a user