anyone-extension/js/store.js
2025-02-12 12:12:01 +02:00

27 lines
753 B
JavaScript

document.addEventListener("DOMContentLoaded", () => {
const comingSoonText = document.getElementById("comingSoon");
const comingSoonImage = document.getElementById("fullScreenImage");
// Check if the domain is working
fetch('https://dapps.debros.io', { method: 'HEAD', mode: 'no-cors' })
.then(response => {
if (response.ok) {
window.location.href = 'https://dapps.debros.io';
} else {
showComingSoonMessage();
}
})
.catch(() => {
showComingSoonMessage();
});
function showComingSoonMessage() {
setTimeout(() => {
comingSoonImage.style.opacity = 1;
}, 200);
setTimeout(() => {
comingSoonText.style.opacity = 1;
}, 1000);
}
});