EVOLUTION-NINJA
Edit File: otp.js
let timer; let timerValue = 60; const resendLink = document.getElementById("resendLink"); function startTimer() { timerValue = 60; updateLinkText(timerValue); resendLink.style.pointerEvents = 'none'; resendLink.textContent = `Resend (00:${timerValue})`; timer = setInterval(() => { timerValue--; updateLinkText(timerValue); if (timerValue <= 0) { clearInterval(timer); resendLink.textContent = 'Resend'; resendLink.style.pointerEvents = 'auto'; } }, 1000); } function updateLinkText(seconds) { if (seconds > 0) { resendLink.textContent = `00:${seconds < 10 ? '0' : ''}${seconds}`; } else { resendLink.textContent = 'Resend'; } } window.onload = () => { startTimer(); }; resendLink.addEventListener('click', function() { if (timerValue <= 0) { console.log("OTP Resent"); startTimer(); } }); document.getElementById('send-otp').addEventListener('click', function() { document.querySelector('.mobile-numberpage').style.display = 'none'; document.querySelector('.otp-section').style.display = 'flex'; });