@prosopo/client-bundle-example 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.html +47 -0
package/package.json
CHANGED
package/src/index.html
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<link href="//cdn.muicss.com/mui-0.10.3/css/mui.min.css" rel="stylesheet" type="text/css"/>
|
|
4
|
+
<title>Procaptcha demo: Simple page</title>
|
|
5
|
+
<script id="procaptchaScript" src="procaptcha.bundle.js" async defer></script>
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<div class="mui-container">
|
|
9
|
+
<form action="?" class="mui-form">
|
|
10
|
+
<legend>Login</legend>
|
|
11
|
+
<div class="mui-textfield mui-textfield--float-label">
|
|
12
|
+
<label>Email Address</label>
|
|
13
|
+
<input type="email" required/>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="mui-textfield mui-textfield--float-label">
|
|
16
|
+
<label>Password</label>
|
|
17
|
+
<input type="password" required/>
|
|
18
|
+
</div>
|
|
19
|
+
<div id="procaptcha-container"></div>
|
|
20
|
+
<!-- Dev sitekey -->
|
|
21
|
+
<div
|
|
22
|
+
class="procaptcha"
|
|
23
|
+
data-theme="light"
|
|
24
|
+
data-sitekey="5HUBceb4Du6dvMA9BiwN5VzUrzUsX9Zp7z7nSR2cC1TCv5jg"
|
|
25
|
+
></div>
|
|
26
|
+
<input type="submit" class="mui-btn mui-btn--raised"/>
|
|
27
|
+
</form>
|
|
28
|
+
</div>
|
|
29
|
+
<script>
|
|
30
|
+
// A function that will call the render Procaptcha function when the procaptcha script has loaded
|
|
31
|
+
document.getElementById('procaptchaScript').addEventListener('load', function () {
|
|
32
|
+
|
|
33
|
+
// Define a callback function to be called when the CAPTCHA is verified
|
|
34
|
+
window.onCaptchaVerified = function (output) {
|
|
35
|
+
console.log('Captcha verified, output: ' + JSON.stringify(output))
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Render the CAPTCHA explicitly on a container with id "procaptcha-container"
|
|
39
|
+
window.procaptcha.render('procaptcha-container', {
|
|
40
|
+
siteKey: '5HUBceb4Du6dvMA9BiwN5VzUrzUsX9Zp7z7nSR2cC1TCv5jg',
|
|
41
|
+
theme: 'dark',
|
|
42
|
+
callback: 'onCaptchaVerified',
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
</script>
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|