From d353118370dceef2d3b75f558a4ee0fa3dfae60a Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Fri, 1 May 2026 16:21:16 +0800 Subject: email captcha --- www/scripts/captcha.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'www/scripts/captcha.js') diff --git a/www/scripts/captcha.js b/www/scripts/captcha.js index e0ebf96..abe5070 100644 --- a/www/scripts/captcha.js +++ b/www/scripts/captcha.js @@ -1,4 +1,6 @@ -async function onTurnstileSuccess(token) { +const emailUl = document.getElementById("email-list") + +async function emailTurnstileSuccess(token) { const response = await fetch("https://backend.altafcreator.com/email", { method: 'POST', headers: { @@ -10,6 +12,11 @@ async function onTurnstileSuccess(token) { const result = await response.json(); if (result.status) { + emailUl.innerHTML = ` +
  • For business inquiries: ${result.business}
  • +
  • For contacting me personally: ${result.personal}
  • + `; } else { + emailUl.innerHTML = `
  • Invalid CAPTCHA.
  • ` } } -- cgit v1.2.3