Your Browser Is Currently Set To Block Cookies ❲PRO →❳
// Set up event listeners once DOM is ready function setupEventListeners() { const enableBtn = document.getElementById('enable-cookies-btn'); const dismissBtn = document.getElementById('dismiss-warning'); const warningEl = document.getElementById('cookie-warning');
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> `; your browser is currently set to block cookies
.enable-btn, .dismiss-btn { padding: 8px 16px; margin-top: 10px; margin-right: 10px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; transition: all 0.2s; } // Set up event listeners once DOM is
modal.addEventListener('click', (e) => { if (e.target === modal) modal.remove(); }); } const warningEl = document.getElementById('cookie-warning')
if (userAgent.includes('chrome')) { return { browser: 'Chrome', steps: [ 'Click the lock icon 🔒 in the address bar', 'Go to "Site settings" or "Cookies"', 'Change "Cookies" setting to "Allow"', 'Refresh the page' ] }; } else if (userAgent.includes('firefox')) { return { browser: 'Firefox', steps: [ 'Click the shield icon 🛡️ in the address bar', 'Toggle off "Enhanced Tracking Protection" for this site', 'Or click "Clear cookies and site data"', 'Refresh the page' ] }; } else if (userAgent.includes('safari')) { return { browser: 'Safari', steps: [ 'Go to Safari > Preferences > Privacy', 'Uncheck "Block all cookies"', 'Under "Cookies and website data", select "Allow"', 'Refresh the page' ] }; } else if (userAgent.includes('edge')) { return { browser: 'Edge', steps: [ 'Click the lock icon 🔒 in the address bar', 'Go to "Cookies"', 'Change to "Allow"', 'Refresh the page' ] }; } else { return { browser: 'your browser', steps: [ 'Open browser settings', 'Search for "cookies"', 'Enable cookies for this site', 'Refresh the page' ] }; } }
HTML <div id="cookie-warning" class="cookie-warning hidden"> <div class="warning-content"> <div class="warning-icon">🍪</div> <h3>Cookies Are Blocked</h3> <p>Your browser is currently set to block cookies. This feature requires cookies to:</p> <ul> <li>Keep you logged in</li> <li>Remember your preferences</li> <li>Provide a personalized experience</li> </ul> <button id="enable-cookies-btn" class="enable-btn">How to Enable Cookies</button> <button id="dismiss-warning" class="dismiss-btn">Dismiss</button> </div> </div> CSS .cookie-warning { position: fixed; bottom: 20px; right: 20px; max-width: 400px; background: white; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); z-index: 10000; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; border-left: 5px solid #ff9800; animation: slideIn 0.3s ease-out; } .cookie-warning.hidden { display: none; }
