const themeMessage = "🔗 Isonomy is live! Explore and elevate your online experience."; const consoleStyles = [ "background: linear-gradient(to right, #34A853, #4CAF50)", "color: #fff", "padding: 10px 20px", "border-radius: 10px", "font-size: 18px", 'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif', "text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4)", "box-shadow: 0 0 10px rgba(0, 0, 0, 0.2)", "display: block", "margin: 10px 0" ].join(";"); console.log(`%c ${themeMessage} 🚀️`, consoleStyles); window.addEventListener('DOMContentLoaded', (event) => { // Add DNS prefetch for CDN domain const dnsPrefetch = document.createElement('link'); dnsPrefetch.rel = 'dns-prefetch'; dnsPrefetch.href = 'https://cdn.isonomy.app'; document.head.appendChild(dnsPrefetch); const baseUrl = 'https://cdn.isonomy.app/v5/'; // Use a static version number instead of timestamp for better caching const version = '1.0.1'; // Update this when deploying new changes const cacheBuster = `?v=${version}`; // Create a link element for CSS with improved loading const styleLink = document.createElement('link'); styleLink.rel = 'stylesheet'; styleLink.href = `${baseUrl}/dist/index.css${cacheBuster}`; styleLink.media = 'print'; styleLink.onload = function () { this.media = 'all'; }; document.head.appendChild(styleLink); // Load script with improved approach const scriptElement = document.createElement('script'); scriptElement.type = 'module'; scriptElement.src = `${baseUrl}dist/index.js${cacheBuster}`; scriptElement.async = true; scriptElement.defer = true; // Handle script load event more efficiently scriptElement.onload = () => { document.dispatchEvent(new Event('AccessifyLoaded')); const accessifyContainer = document.querySelector('.Accessify_Container'); if (accessifyContainer) { accessifyContainer.style.display = "block"; } }; document.body.appendChild(scriptElement); });