",
POPUNDER_DELAY_MINUTES: 10
};
// ==========================================
// 2. VIDEO & BUTTONS INITIALIZATION
// ==========================================
const video = document.getElementById("liveVideo");
const videoSource = document.getElementById("videoSource");
const unmuteBtn = document.getElementById("unmuteBtn");
const videoShield = document.getElementById("videoShield");
videoSource.src = CONFIG.R2_VIDEO_URL;
video.load();
video.play().catch(() => {});
document.getElementById("whatsappBtn").href = CONFIG.WHATSAPP_DIRECT_LINK;
document.getElementById("telegramBtn").href = CONFIG.TELEGRAM_DIRECT_LINK;
function enableAudio() {
video.muted = false;
video.volume = 1.0;
video.play().catch(() => {});
unmuteBtn.classList.add("hidden");
}
unmuteBtn.addEventListener("click", enableAudio);
videoShield.addEventListener("click", () => {
if (video.muted) enableAudio();
});
// ==========================================
// 3. RANDOM LIVE VIEWERS (2.0K - 9.0K)
// ==========================================
const viewerCountEl = document.getElementById("viewerCount");
let currentViewers = Math.floor(Math.random() * (5800 - 3200 + 1)) + 3200;
function formatViewers(num) {
return (num / 1000).toFixed(1) + "K";
}
viewerCountEl.textContent = formatViewers(currentViewers);
setInterval(() => {
const delta = Math.floor(Math.random() * 151) - 65;
currentViewers += delta;
if (currentViewers < 2000) currentViewers = 2000 + Math.floor(Math.random() * 120);
if (currentViewers > 9000) currentViewers = 9000 - Math.floor(Math.random() * 120);
viewerCountEl.textContent = formatViewers(currentViewers);
}, 3200);
// ==========================================
// 4. 10-MINUTE PER-USER POPUNDER INJECTOR
// ==========================================
(function scheduleAdsterraPopunder() {
const userLandedAt = Date.now();
const delayMs = CONFIG.POPUNDER_DELAY_MINUTES * 60 * 1000;
let scriptInjected = false;
const timerCheck = setInterval(() => {
if (!scriptInjected && (Date.now() - userLandedAt >= delayMs)) {
scriptInjected = true;
clearInterval(timerCheck);
if (
CONFIG.ADSTERRA_POPUNDER_SCRIPT_URL &&
!CONFIG.ADSTERRA_POPUNDER_SCRIPT_URL.includes("YOUR_POPUNDER.js")
) {
const popScript = document.createElement("script");
popScript.type = "text/javascript";
popScript.src = CONFIG.ADSTERRA_POPUNDER_SCRIPT_URL;
popScript.async = true;
document.body.appendChild(popScript);
}
}
}, 1000);
})();