Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set styles on turnstile div
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent abe5632 commit d68687f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/api/webview-captcha.ts
@@ -1,13 +1,13 @@
export async function onRequestGet(context: RequestContext) {
return new Response(
`<!DOCTYPE html>
<html lang="en" style="width: 90%; translate(5%);">
<html lang="en">
<head>
<title>WebView Captcha</title>
<script async defer src="https://challenges.cloudflare.com/turnstile/v0/api.js"></script>
</head>
<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>
function handleError(error) {
console.error(error);
Expand Down

0 comments on commit d68687f

Please sign in to comment.