Loading function showErrorMessage(error) { const loadingSpinner = document.getElementById('bundleLoadingSpinner'); const bundleLoadError = document.getElementById('bundleLoadError'); if (!bundleLoadError && !loadingSpinner) { window.removeEventListener('unhandledrejection', showErrorMessage); return; } if (loadingSpinner) { loadingSpinner.classList.add('hide'); } if (bundleLoadError) { bundleLoadError.classList.remove('hide'); bundleLoadError.innerHTML = ` Top Hat failed to load ⚠️ Try refreshing this page. If the issue persists, your browser might be outdated.