|
49 | 49 | <meta charset="UTF-8">
|
50 | 50 | <meta name="viewport" content="width=device-width,height=device-height,minimum-scale=1">
|
51 | 51 | <link rel="shortcut icon" href="https://www.gstatic.com/recaptcha/admin/favicon.ico" type="image/x-icon"/>
|
52 |
| -<link rel="canonical" href="https://recaptcha-demo.appspot.com/recaptcha-v2-request-scores.php"> |
53 |
| -<script type="application/ld+json">{ "@context": "http://schema.org", "@type": "WebSite", "name": "reCAPTCHA demo - Request scores", "url": "https://recaptcha-demo.appspot.com/recaptcha-v2-request-scores.php" }</script> |
| 52 | +<link rel="canonical" href="https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php"> |
| 53 | +<script type="application/ld+json">{ "@context": "http://schema.org", "@type": "WebSite", "name": "reCAPTCHA demo - Request scores", "url": "https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php" }</script> |
54 | 54 | <meta name="description" content="reCAPTCHA demo - Request scores" />
|
55 |
| -<meta property="og:url" content="https://recaptcha-demo.appspot.com/recaptcha-v2-request-scores.php" /> |
| 55 | +<meta property="og:url" content="https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php" /> |
56 | 56 | <meta property="og:type" content="website" />
|
57 | 57 | <meta property="og:title" content="reCAPTCHA demo - Request scores" />
|
58 | 58 | <meta property="og:description" content="reCAPTCHA demo - Request scores" />
|
|
82 | 82 | <li class="step3 hidden">Received response from our backend: <pre class="response">{"json": "from-backend"}</pre></li>
|
83 | 83 | </ol>
|
84 | 84 | <p><a href="/recaptcha-v3-request-scores.php">⟳ Try again</a></p>
|
85 |
| - |
86 | 85 | <script src="https://www.google.com/recaptcha/api.js?render=<?php echo $siteKey; ?>"></script>
|
87 | 86 | <script>
|
88 |
| - const steps = document.getElementById('recaptcha-steps'); |
89 |
| - grecaptcha.ready(function() { |
90 |
| - document.querySelector('.step1').classList.remove('hidden'); |
91 |
| - grecaptcha.execute('<?php echo $siteKey; ?>', {action: 'examples/v3scores'}).then(function(token) { |
92 |
| - document.querySelector('.token').innerHTML = 'fetch(\'/recaptcha-v3-verify.php?token=\'' + token; |
93 |
| - document.querySelector('.step2').classList.remove('hidden'); |
| 87 | + const steps = document.getElementById('recaptcha-steps'); |
| 88 | + grecaptcha.ready(function() { |
| 89 | + document.querySelector('.step1').classList.remove('hidden'); |
| 90 | + grecaptcha.execute('<?php echo $siteKey; ?>', {action: 'examples/v3scores'}).then(function(token) { |
| 91 | + document.querySelector('.token').innerHTML = 'fetch(\'/recaptcha-v3-verify.php?token=\'' + token; |
| 92 | + document.querySelector('.step2').classList.remove('hidden'); |
94 | 93 |
|
95 |
| - fetch('/recaptcha-v3-verify.php?token='+token).then(function(response) { |
96 |
| - response.json().then(function(data) { |
97 |
| - document.querySelector('.response').innerHTML = JSON.stringify(data, null, 2); |
98 |
| - document.querySelector('.step3').classList.remove('hidden'); |
| 94 | + fetch('/recaptcha-v3-verify.php?token='+token).then(function(response) { |
| 95 | + response.json().then(function(data) { |
| 96 | + document.querySelector('.response').innerHTML = JSON.stringify(data, null, 2); |
| 97 | + document.querySelector('.step3').classList.remove('hidden'); |
| 98 | + }); |
99 | 99 | });
|
100 | 100 | });
|
101 | 101 | });
|
102 |
| - }); |
103 |
| -</script> |
| 102 | + </script> |
104 | 103 | <?php
|
105 | 104 | endif;?>
|
106 | 105 | </main>
|
107 |
| - |
108 | 106 | <!-- Google Analytics - just ignore this -->
|
109 | 107 | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-123057962-1"></script>
|
110 | 108 | <script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-123057962-1');</script>
|
0 commit comments