Skip to content

Commit

Permalink
Update api.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev.Huang authored Jul 5, 2024
1 parent b0454c4 commit b7df8f2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions captcha/v1/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,15 @@ function completeVerification() {
}
}

function mathCaptchaButton.addEventListener('click', () => {
if (parseInt(mathCaptchaInput.value, 10) === mathAnswer) {
hideMathCaptcha();
completeVerification();
} else {
mathCaptchaError.style.display = 'block';
generateMathCaptcha();
}

// Event listener for the verify checkbox
verifyCheckbox.addEventListener('change', () => {
if (verifyCheckbox.checked) {
Expand Down

0 comments on commit b7df8f2

Please sign in to comment.