Spaces:
Sleeping
Sleeping
File size: 574 Bytes
43a06dc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import { turnstileSolved } from "$lib/state/turnstile";
const getResponse = () => {
const turnstileElement = document.getElementById("turnstile-widget");
if (turnstileElement) {
return window?.turnstile?.getResponse(turnstileElement);
}
return null;
}
const reset = () => {
const turnstileElement = document.getElementById("turnstile-widget");
if (turnstileElement) {
turnstileSolved.set(false);
return window?.turnstile?.reset(turnstileElement);
}
return null;
}
export default {
getResponse,
reset,
}
|