From cdfdd3a2d6bdd2ac37e2bd237b6e760864e41db1 Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Fri, 1 May 2026 12:27:42 +0800 Subject: new backend + turnstile --- www/scripts/captcha.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 www/scripts/captcha.js (limited to 'www/scripts/captcha.js') diff --git a/www/scripts/captcha.js b/www/scripts/captcha.js new file mode 100644 index 0000000..2a58534 --- /dev/null +++ b/www/scripts/captcha.js @@ -0,0 +1,17 @@ +async function onTurnstileSuccess(token) { + const response = await fetch("https://backend.altafcreator.com", { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({"token": token}), + }); + + const result = await response.json(); + + if (result.status) { + alert(result); + } else { + alert("fail"); + } +} -- cgit v1.2.3