Set styles on turnstile div

This commit is contained in:
regalijan 2023-10-19 16:51:12 -04:00
parent abe5632c30
commit d68687f0af
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -1,13 +1,13 @@
export async function onRequestGet(context: RequestContext) { export async function onRequestGet(context: RequestContext) {
return new Response( return new Response(
`<!DOCTYPE html> `<!DOCTYPE html>
<html lang="en" style="width: 90%; translate(5%);"> <html lang="en">
<head> <head>
<title>WebView Captcha</title> <title>WebView Captcha</title>
<script async defer src="https://challenges.cloudflare.com/turnstile/v0/api.js"></script> <script async defer src="https://challenges.cloudflare.com/turnstile/v0/api.js"></script>
</head> </head>
<body> <body>
<div class="cf-turnstile" data-callback="returnToken" data-error-callback="handleError" data-sitekey="${context.env.TURNSTILE_SITEKEY}"></div> <div class="cf-turnstile" data-callback="returnToken" data-error-callback="handleError" data-sitekey="${context.env.TURNSTILE_SITEKEY}" style="width: 90%; translate(5%);"></div>
<script> <script>
function handleError(error) { function handleError(error) {
console.error(error); console.error(error);