diff options
Diffstat (limited to 'www/scripts/captcha.js')
| -rw-r--r-- | www/scripts/captcha.js | 9 |
1 files changed, 8 insertions, 1 deletions
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 = ` +<li>For <b>business<span class="desktop"> inquiries</span></b>: <a href="mailto:${result.business}" class="link"><i class="fa-solid fa-envelope"></i> ${result.business}</a></li> +<li>For <span class="desktop">contacting me </span><b>personal<span class="desktop">ly</span></b>: <a href="mailto:${result.personal}" class="link"><i class="fa-solid fa-envelope"></i> ${result.personal}</a></li> + `; } else { + emailUl.innerHTML = `<li>Invalid CAPTCHA.</li>` } } |
