This commit is contained in:
sent 2025-04-17 09:27:26 -07:00
parent cc6ecc1188
commit c399f5003e

View File

@ -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 <a href="https://discord.gg/dJvdkPRheV" target="_blank" class="hover-link">Discord</a>&nbsp;<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') {