Files
minicrm/public/loading-end.js
Калугин Олег Александрович 97609b3ba7 загрузка сервиса и рандом
2026-02-22 08:26:12 +00:00

29 lines
1.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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);
})();