document.querySelector("body > div.app-inner.flex.flex-col.min-h-full > header > div.main-nav-container.shadow-default.bg-white > div > div > div .flex.items-center.justify-end").innerHTML+= `
`; if (!localStorage.getItem("nationalPopupShown")) { // var totalSeconds = 5 * 3600 + 37 * 60; // 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.5)"; overlay.style.display = "flex"; overlay.style.alignItems = "center"; overlay.style.justifyContent = "center"; overlay.style.zIndex = "9999"; overlay.style.opacity = "0"; overlay.style.transition = "opacity 0.5s ease"; // var popup = document.createElement("div"); popup.style.backgroundColor = "#27ae60"; popup.style.color = "#fff"; popup.style.padding = "25px 15px"; popup.style.borderRadius = "15px"; popup.style.textAlign = "center"; popup.style.maxWidth = "400px"; popup.style.width = "85%"; popup.style.boxShadow = "0 8px 20px rgba(0,0,0,0.3)"; popup.style.cursor = "pointer"; popup.style.fontWeight = "bold"; popup.style.position = "relative"; // var text = document.createElement("div"); text.innerText = "عرض اليوم الوطني لايتكرر | اضغط هنا"; text.style.marginBottom = "20px"; text.style.fontSize = "18px"; text.style.lineHeight = "1.3"; popup.appendChild(text); // var timerDiv = document.createElement("div"); timerDiv.style.display = "flex"; timerDiv.style.justifyContent = "center"; timerDiv.style.gap = "10px"; timerDiv.style.flexWrap = "wrap"; var hoursBox = document.createElement("div"); var minutesBox = document.createElement("div"); var secondsBox = document.createElement("div"); [hoursBox, minutesBox, secondsBox].forEach(function(box){ box.style.backgroundColor = "#1e8449"; box.style.padding = "10px"; box.style.borderRadius = "8px"; box.style.minWidth = "50px"; box.style.color = "#fff"; box.style.fontWeight = "bold"; box.style.textAlign = "center"; box.style.fontSize = "16px"; }); timerDiv.appendChild(hoursBox); timerDiv.appendChild(minutesBox); timerDiv.appendChild(secondsBox); popup.appendChild(timerDiv); // var closeBtn = document.createElement("span"); closeBtn.innerText = "✖"; closeBtn.style.position = "absolute"; closeBtn.style.top = "10px"; closeBtn.style.right = "15px"; closeBtn.style.cursor = "pointer"; closeBtn.style.fontSize = "16px"; closeBtn.onclick = function(e) { e.stopPropagation(); document.body.removeChild(overlay); }; popup.appendChild(closeBtn); // popup.onclick = function() { window.open("https://nad4k.com/%D8%A7%D8%B4%D8%AA%D8%B1%D8%A7%D9%83-%D9%81%D9%88%D9%84%D8%AA%D8%B4%D8%B1-9-%D8%B4%D9%87%D9%88%D8%B1/p1602161869", "_blank"); document.body.removeChild(overlay); } overlay.appendChild(popup); document.body.appendChild(overlay); // setTimeout(function() { overlay.style.opacity = "1"; }, 50); // localStorage.setItem("nationalPopupShown", "true"); // function updateTimer() { if (totalSeconds < 0) { clearInterval(interval); hoursBox.innerText = minutesBox.innerText = secondsBox.innerText = "00"; return; } var hours = Math.floor(totalSeconds / 3600); var minutes = Math.floor((totalSeconds % 3600) / 60); var seconds = totalSeconds % 60; hoursBox.innerHTML = (hours < 10 ? "0"+hours : hours) + "
ساعة"; minutesBox.innerHTML = (minutes < 10 ? "0"+minutes : minutes) + "
دقيقة"; secondsBox.innerHTML = (seconds < 10 ? "0"+seconds : seconds) + "
ثانية"; totalSeconds--; } updateTimer(); // عرض أولي var interval = setInterval(updateTimer, 1000); }