forked from sent/waves
Fix
This commit is contained in:
parent
cc6ecc1188
commit
c399f5003e
|
@ -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> <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') {
|
||||
|
|
Loading…
Reference in New Issue
Block a user