Skip to content

Commit

Permalink
Merge pull request #2 from AElfProject/develop
Browse files Browse the repository at this point in the history
feat: added new google-captcha page
  • Loading branch information
yongenaelf authored Nov 27, 2024
2 parents 0155ebc + 8db4f8c commit c7ead5c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions public/captcha.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>reCAPTCHA</title>
<script
src="https://www.google.com/recaptcha/api.js"
async
defer
onerror="onLoadError()"
></script>
</head>
<body>
<div
class="g-recaptcha"
data-sitekey="6LfkxmQqAAAAAMNY2KJjJiXGRacgy3YcihzPr8k5"
data-callback="onRecaptchaSuccess"
></div>
<script>
function onRecaptchaSuccess(token) {
window.parent.postMessage({ recaptchaToken: token }, "*");
}
function onLoadError() {
window.parent.postMessage({ error: "Recaptcha failed to load." }, "*");
}
</script>
</body>
</html>

0 comments on commit c7ead5c

Please sign in to comment.