Skip to content

Commit b5219d4

Browse files
committed
Make sure turnstile is passed
1 parent 625d286 commit b5219d4

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

index.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,19 +172,33 @@ features:
172172
}
173173
</style>
174174

175+
<script setup>
176+
let turnstilePassed = false;
177+
window.turnstileReady = (_token) => {
178+
turnstilePassed = true;
179+
}
180+
181+
function checkTurnstile(event) {
182+
if (!turnstilePassed) {
183+
event.preventDefault();
184+
alert("Please verify you are human before submitting.");
185+
}
186+
}
187+
</script>
188+
175189
<div class="footer" id="hosted-waitlist">
176190
<img src="/icon.png" />
177191
<h1>Join the waitlist!</h1>
178192
<h3>Turn your Android phone number into a blue bubble without the need of an iPhone or other Apple device.</h3>
179193

180-
<form action="https://hw.openbubbles.app/waitlist" method="POST">
194+
<form action="https://hw.openbubbles.app/waitlist" method="POST" @submit="checkTurnstile">
181195
<label for="emailimp">Email</label>
182196
<input type="email" name="email" id="emailimp" placeholder="Enter email here" class="myinput" required/>
183197

184198
<input type="hidden" name="price_okay" value="okay">
185199
<input type="hidden" name="price" value="">
186200

187-
<div style="margin-top: 15px" class="cf-turnstile" data-sitekey="0x4AAAAAABB_VM-Rvy-vlB1W"></div>
201+
<div style="margin-top: 15px" class="cf-turnstile" data-sitekey="0x4AAAAAABB_VM-Rvy-vlB1W" data-callback="turnstileReady"></div>
188202

189203
<input type="submit" value="Join waitlist">
190204
</form>

0 commit comments

Comments
 (0)