Update index.html
Browse files- index.html +12 -2
index.html
CHANGED
|
@@ -53,7 +53,9 @@
|
|
| 53 |
<div class="card">
|
| 54 |
<h2>Vibow AI Verification</h2>
|
| 55 |
|
| 56 |
-
<div class="h-captcha"
|
|
|
|
|
|
|
| 57 |
|
| 58 |
<button onclick="submitForm()">Verify</button>
|
| 59 |
<div id="loading" class="loading">⏳ Verifying...</div>
|
|
@@ -88,14 +90,22 @@
|
|
| 88 |
});
|
| 89 |
const data = await response.json();
|
| 90 |
loading.style.display = "none";
|
|
|
|
| 91 |
if (data.success) {
|
| 92 |
-
result.innerHTML = "✅ Verification success!";
|
|
|
|
|
|
|
|
|
|
| 93 |
} else {
|
| 94 |
result.innerHTML = "❌ Failed: " + JSON.stringify(data);
|
| 95 |
}
|
| 96 |
} catch (err) {
|
| 97 |
loading.style.display = "none";
|
| 98 |
result.innerHTML = "⚠️ Error: " + err.message;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
}
|
| 100 |
}
|
| 101 |
</script>
|
|
|
|
| 53 |
<div class="card">
|
| 54 |
<h2>Vibow AI Verification</h2>
|
| 55 |
|
| 56 |
+
<div class="h-captcha"
|
| 57 |
+
data-sitekey="d2667a10-0862-4a5a-90d8-2fa4ce183d06"
|
| 58 |
+
data-callback="setToken"></div>
|
| 59 |
|
| 60 |
<button onclick="submitForm()">Verify</button>
|
| 61 |
<div id="loading" class="loading">⏳ Verifying...</div>
|
|
|
|
| 90 |
});
|
| 91 |
const data = await response.json();
|
| 92 |
loading.style.display = "none";
|
| 93 |
+
|
| 94 |
if (data.success) {
|
| 95 |
+
result.innerHTML = "✅ Verification success! Redirecting...";
|
| 96 |
+
setTimeout(() => {
|
| 97 |
+
window.location.href = "https://vibow.netlify.app/donate.html"; // ganti tujuanmu
|
| 98 |
+
}, 1500);
|
| 99 |
} else {
|
| 100 |
result.innerHTML = "❌ Failed: " + JSON.stringify(data);
|
| 101 |
}
|
| 102 |
} catch (err) {
|
| 103 |
loading.style.display = "none";
|
| 104 |
result.innerHTML = "⚠️ Error: " + err.message;
|
| 105 |
+
} finally {
|
| 106 |
+
// Reset captcha biar token lama gak kepakai lagi
|
| 107 |
+
hcaptcha.reset();
|
| 108 |
+
captchaToken = "";
|
| 109 |
}
|
| 110 |
}
|
| 111 |
</script>
|