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');
|
const erudaLoadingScreen = document.getElementById('erudaLoadingScreen');
|
||||||
if (!refreshIcon || !fullscreenIcon || !backIcon || !forwardIcon || !iframe) return;
|
if (!refreshIcon || !fullscreenIcon || !backIcon || !forwardIcon || !iframe) return;
|
||||||
let loadingHidden = false;
|
let loadingHidden = false;
|
||||||
|
let hideTimeout;
|
||||||
|
|
||||||
function showLoadingScreen(withToast = true, showEruda = false) {
|
function showLoadingScreen(withToast = true, showEruda = false) {
|
||||||
|
clearTimeout(hideTimeout)
|
||||||
loadingHidden = false;
|
loadingHidden = false;
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
|
|
||||||
|
hideTimeout = setTimeout(() => {
|
||||||
|
hideLoadingScreen();
|
||||||
|
}, 15000);
|
||||||
|
|
||||||
if (withToast) {
|
if (withToast) {
|
||||||
showToast(
|
showToast(
|
||||||
'Consider joining our <a href="https://discord.gg/dJvdkPRheV" target="_blank" class="hover-link">Discord</a> <3',
|
'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() {
|
function hideLoadingScreen() {
|
||||||
if (loadingHidden) return;
|
if (loadingHidden) return;
|
||||||
|
clearTimeout(hideTimeout)
|
||||||
loadingHidden = true;
|
loadingHidden = true;
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
}
|
}
|
||||||
|
@ -246,7 +254,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
if (u.hostname.includes('.')) return u.toString();
|
if (u.hostname.includes('.')) return u.toString();
|
||||||
} catch {}
|
} 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') {
|
function showToast(message, type = 'success', iconType = 'check') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user