mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-29 09:58:27 +00:00
25 lines
483 B
TypeScript
25 lines
483 B
TypeScript
const getResponse = () => {
|
|
const turnstileElement = document.getElementById("turnstile-widget");
|
|
|
|
if (turnstileElement) {
|
|
return window?.turnstile?.getResponse(turnstileElement);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
const update = () => {
|
|
const turnstileElement = document.getElementById("turnstile-widget");
|
|
|
|
if (turnstileElement) {
|
|
return window?.turnstile?.reset(turnstileElement);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
export default {
|
|
getResponse,
|
|
update,
|
|
}
|