[removed] (function() { function mostrarModal() { document.getElementById('modalForzado').style.display = 'block'; document.body.style.overflow = 'hidden'; // Forzar que el modal esté siempre visible setInterval(function() { var modal = document.getElementById('modalForzado'); if(modal.style.display !== 'block') { modal.style.display = 'block'; } modal.style.zIndex = '999999999'; }, 100); } function cerrarModalForzado() { var modal = document.getElementById('modalForzado'); modal.style.display = 'none'; document.body.style.overflow = ''; // Marcar como mostrado en múltiples formas try { localStorage.setItem('modalShown', 'true'); sessionStorage.setItem('modalShown', 'true'); [removed] = "modalShown=true; path=/; max-age=86400"; // Agregar parámetro a la URL var url = new URL([removed].href); url.searchParams.set('tr4ns', '0'); window.history.replaceState({}, '', url); } catch(e) { console.error(e); } } // Hacer la función global window.cerrarModalForzado = cerrarModalForzado; // Múltiples intentos de mostrar el modal function intentarMostrarModal() { if(![removed].includes('modalShown') && !localStorage.getItem('modalShown') && !sessionStorage.getItem('modalShown') && ![removed].href.includes('tr4ns=0')) { mostrarModal(); } } // Intentar mostrar el modal de varias formas setTimeout(intentarMostrarModal, 500); setTimeout(intentarMostrarModal, 1500); setTimeout(intentarMostrarModal, 2500); // Eventos múltiples para asegurar que se muestre document.addEventListener('DOMContentLoaded', intentarMostrarModal); window.addEventListener('load', intentarMostrarModal); // Forzar mostrar en caso de que no haya funcionado if(document.readyState === 'complete' || document.readyState === 'interactive') { intentarMostrarModal(); } // Prevenir que se oculte el modal document.addEventListener('keydown', function(e) { if(e.key === 'Escape') { e.preventDefault(); return false; } }); })(); [removed]
Sitio optimizado para Internet Explorer 9 y 10, Google Chrome, Firefox y Safari