diff --git a/public/assets/js/$.js b/public/assets/js/$.js index 92869596..3c990e85 100644 --- a/public/assets/js/$.js +++ b/public/assets/js/$.js @@ -9,10 +9,17 @@ document.addEventListener('DOMContentLoaded', () => { const erudaLoadingScreen = document.getElementById('erudaLoadingScreen'); if (!refreshIcon || !fullscreenIcon || !backIcon || !forwardIcon || !iframe) return; let loadingHidden = false; + let hideTimeout; function showLoadingScreen(withToast = true, showEruda = false) { + clearTimeout(hideTimeout) loadingHidden = false; NProgress.start(); + + hideTimeout = setTimeout(() => { + hideLoadingScreen(); + }, 15000); + if (withToast) { showToast( 'Consider joining our Discord <3', @@ -24,6 +31,7 @@ document.addEventListener('DOMContentLoaded', () => { function hideLoadingScreen() { if (loadingHidden) return; + clearTimeout(hideTimeout) loadingHidden = true; NProgress.done(); } @@ -246,7 +254,7 @@ document.addEventListener('DOMContentLoaded', () => { if (u.hostname.includes('.')) return u.toString(); } catch {} } - return `https://search.brave.com/search?q=${encodeURIComponent(query)}`; + return `https://duckduckgo.com/search?q=${encodeURIComponent(query)}&ia=web`; } function showToast(message, type = 'success', iconType = 'check') {