Your Browser Is Currently Set To Block Cookies 2021 <360p 2024>
.warning-icon { font-size: 40px; text-align: center; margin-bottom: 10px; }
// Get browser-specific instructions function getBrowserInstructions() { const userAgent = navigator.userAgent.toLowerCase(); your browser is currently set to block cookies
.warning-content { padding: 20px; }
if (dismissBtn && warningEl) { dismissBtn.addEventListener('click', () => { warningEl.classList.add('hidden'); // Store dismissal time localStorage.setItem('cookieWarningDismissed', Date.now().toString()); }); } } .warning-icon { font-size: 40px
if (!areCookiesEnabled()) { const warningEl = document.getElementById('cookie-warning'); if (warningEl) { warningEl.classList.remove('hidden'); // Optional: Log for analytics console.warn('[Cookie Check] Cookies are blocked in this browser'); // You could send this to your analytics service if (typeof gtag !== 'undefined') { gtag('event', 'cookies_blocked', { 'event_category': 'user_preferences', 'event_label': navigator.userAgent }); } } } } .warning-content { padding: 20px
modal.innerHTML = ` <div style="background: white; border-radius: 12px; max-width: 450px; width: 90%; padding: 25px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);"> <h3 style="margin-top: 0;">Enable Cookies in ${instructions.browser}</h3> <ol style="margin: 20px 0; padding-left: 20px;"> ${instructions.steps.map(step => `<li style="margin: 12px 0;">${step}</li>`).join('')} </ol> <div style="display: flex; justify-content: flex-end; gap: 10px;"> <button id="close-modal-btn" style="padding: 8px 16px; background: #2196f3; color: white; border: none; border-radius: 6px; cursor: pointer;">Got it</button> </div> </div> `;
.dismiss-btn:hover { background: #bdbdbd; }