MozLife

Please upgrade your browser to use Reendexnews

We built using the latest web technologies, to bring you information wherever you are. This makes reendexnews faster and easier to use.

(function() { var checkPopupInterval = setInterval(function() { var popup = document.querySelector('.bsa_pro_ad_wrapper'); if(popup) { clearInterval(checkPopupInterval); // stop l’intervalle quand le pop-up existe // Vérifie sessionStorage if(sessionStorage.getItem('popup_seen')) { popup.style.display = 'none'; // cache si déjà vu } else { sessionStorage.setItem('popup_seen', 'true'); // Styles responsive popup.style.width = '500px'; popup.style.height = '500px'; popup.style.maxWidth = '90%'; popup.style.maxHeight = '90%'; popup.style.margin = '0 auto'; popup.style.boxSizing = 'border-box'; popup.style.position = 'fixed'; popup.style.top = '50%'; popup.style.left = '50%'; popup.style.transform = 'translate(-50%, -50%)'; popup.style.backgroundColor = '#fff'; popup.style.zIndex = '9999'; popup.style.opacity = '0'; popup.style.transition = 'opacity 0.5s ease'; // Overlay var overlay = document.createElement('div'); overlay.style.position = 'fixed'; overlay.style.top = '0'; overlay.style.left = '0'; overlay.style.width = '100%'; overlay.style.height = '100%'; overlay.style.backgroundColor = 'rgba(0,0,0,0.7)'; overlay.style.zIndex = '9998'; overlay.style.opacity = '0'; overlay.style.transition = 'opacity 0.5s ease'; document.body.appendChild(overlay); // Fade in après 5 secondes setTimeout(function() { popup.style.opacity = '1'; overlay.style.opacity = '1'; }, 5000); // Close button var closeBtn = document.createElement('button'); closeBtn.innerHTML = '×'; closeBtn.style.position = 'absolute'; closeBtn.style.top = '10px'; closeBtn.style.right = '10px'; closeBtn.style.background = 'transparent'; closeBtn.style.border = 'none'; closeBtn.style.fontSize = '24px'; closeBtn.style.cursor = 'pointer'; popup.appendChild(closeBtn); closeBtn.addEventListener('click', function() { popup.style.display = 'none'; overlay.style.display = 'none'; }); // Responsive dynamique function resizePopup() { if (window.innerWidth < 769) { popup.style.width = '90%'; popup.style.height = 'auto'; } else { popup.style.width = '500px'; popup.style.height = '500px'; } } resizePopup(); window.addEventListener('resize', resizePopup); } } }, 200); // vérifie toutes les 200ms })();