@prosopo/client-bundle-example 2.7.0 → 2.8.0
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/CHANGELOG.md +10 -0
- package/dist/assets/{ProcaptchaWidget-3gKvjeiH.js → ProcaptchaWidget-DrBDhP6X.js} +7 -7
- package/dist/assets/{ProcaptchaWidget-D6-M7iAv.js → ProcaptchaWidget-rAM-9Rap.js} +4 -4
- package/dist/assets/{asU8a-DCECA0Qe.js → asU8a-CJdNkNEq.js} +1 -1
- package/dist/assets/{bip39-BQoZog_M.js → bip39-Du2cANEV.js} +2 -2
- package/dist/assets/captcha-BhkVCEXM.css +1 -0
- package/dist/assets/{captchaComponentProvider-BW2eXmc3.js → captchaComponentProvider-DmV1WTrT.js} +4 -4
- package/dist/assets/{captchaRenderer-B_MgGzr9.js → captchaRenderer-RIsSZXCC.js} +2 -2
- package/dist/assets/{emotion-element-5486c51c.browser.esm-CCAJ8JId.js → emotion-element-5486c51c.browser.esm-C3u8NMUC.js} +127 -125
- package/dist/assets/frictionless-explicit-Dq_sNGRK.js +1 -0
- package/dist/assets/frictionless-implicit-Dq_sNGRK.js +1 -0
- package/dist/assets/{hash-BR0YLxPF.js → hash-_rWungeW.js} +1 -1
- package/dist/assets/image-explicit-DQvfVB7-.js +4 -0
- package/dist/assets/image-implicit-Bwa9QJO5.js +1 -0
- package/dist/assets/{index-WqEmiYQ_.js → index-BVr9fC_3.js} +4 -4
- package/dist/assets/{index-BYUYvvuq.js → index-Cu5oL_7b.js} +4 -4
- package/dist/assets/index-Dpt_5E72.js +1 -0
- package/dist/assets/{index-BCjHZ8o6.js → index-DxIFpl6U.js} +1 -1
- package/dist/assets/{index-2or4-1WF.js → index-Wgw2GQWq.js} +2 -2
- package/dist/assets/invisible-frictionless-explicit-DugBtRe4.js +4 -0
- package/dist/assets/invisible-frictionless-implicit-DYYos8W9.js +1 -0
- package/dist/assets/invisible-image-explicit-C5Z4gSb1.js +4 -0
- package/dist/assets/invisible-image-implicit-DfNFNlFj.js +1 -0
- package/dist/assets/invisible-pow-explicit-DjqGWFUb.js +4 -0
- package/dist/assets/invisible-pow-implicit-BRXL14FH.js +4 -0
- package/dist/assets/pow-explicit-BexxbnHM.js +4 -0
- package/dist/assets/pow-implicit-Dpt_5E72.js +1 -0
- package/dist/assets/procaptcha.bundle.js +1 -1
- package/dist/assets/{useTranslation-BPbGzrhj.js → useTranslation-CJplXtqb.js} +1 -1
- package/dist/frictionless-explicit.html +881 -0
- package/dist/frictionless-implicit.html +874 -0
- package/dist/image-explicit.html +877 -0
- package/dist/index.html +575 -74
- package/dist/invisible-frictionless-explicit.html +626 -283
- package/dist/invisible-frictionless-implicit.html +631 -173
- package/dist/invisible-image-explicit.html +627 -284
- package/dist/invisible-image-implicit.html +631 -173
- package/dist/invisible-pow-explicit.html +627 -284
- package/dist/invisible-pow-implicit.html +629 -177
- package/dist/plugins/explanation-injector.ts +250 -0
- package/dist/plugins/form-filler-injector.ts +233 -0
- package/dist/plugins/navigation-injector.ts +237 -89
- package/dist/plugins/status-log-injector.ts +199 -0
- package/dist/pow-explicit.html +877 -0
- package/dist/pow-implicit.html +881 -0
- package/package.json +1 -1
- package/vite.config.ts +32 -3
- package/dist/assets/frictionless-ZgzyuneX.js +0 -1
- package/dist/assets/index-BWsu-rGU.js +0 -1
- package/dist/assets/invisible-frictionless-explicit-DgCaJtPg.js +0 -1
- package/dist/assets/invisible-image-explicit-DgCaJtPg.js +0 -1
- package/dist/assets/invisible-pow-explicit-DgCaJtPg.js +0 -1
- package/dist/assets/pow-BW3QYcgP.js +0 -1
- package/dist/frictionless.html +0 -343
- package/dist/pow.html +0 -323
- /package/dist/assets/{modulepreload-polyfill-B5Qt9EMX.js → captcha-ByKnSsbG.js} +0 -0
package/package.json
CHANGED
package/vite.config.ts
CHANGED
|
@@ -16,7 +16,10 @@ import fs from "node:fs";
|
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
import { loadEnv } from "@prosopo/dotenv";
|
|
18
18
|
import { type UserConfig, defineConfig } from "vite";
|
|
19
|
+
import explanationInjector from "./src/plugins/explanation-injector.js";
|
|
20
|
+
import formFillerInjector from "./src/plugins/form-filler-injector.js";
|
|
19
21
|
import navigationInjector from "./src/plugins/navigation-injector.js";
|
|
22
|
+
import statusLogInjector from "./src/plugins/status-log-injector.js";
|
|
20
23
|
|
|
21
24
|
// Function to copy contents of a directory to another directory
|
|
22
25
|
function copyDirContents(src: string, dest: string) {
|
|
@@ -93,11 +96,24 @@ export default defineConfig(({ command, mode }) => {
|
|
|
93
96
|
"import.meta.env.PROSOPO_SITE_KEY": JSON.stringify(
|
|
94
97
|
process.env.PROSOPO_SITE_KEY,
|
|
95
98
|
),
|
|
99
|
+
"import.meta.env.PROSOPO_SITE_KEY_IMAGE": JSON.stringify(
|
|
100
|
+
process.env.PROSOPO_SITE_KEY_IMAGE,
|
|
101
|
+
),
|
|
102
|
+
"import.meta.env.PROSOPO_SITE_KEY_SLIDER": JSON.stringify(
|
|
103
|
+
process.env.PROSOPO_SITE_KEY_SLIDER,
|
|
104
|
+
),
|
|
105
|
+
"import.meta.env.PROSOPO_SITE_KEY_POW": JSON.stringify(
|
|
106
|
+
process.env.PROSOPO_SITE_KEY_POW,
|
|
107
|
+
),
|
|
108
|
+
"import.meta.env.PROSOPO_SITE_KEY_FRICTIONLESS": JSON.stringify(
|
|
109
|
+
process.env.PROSOPO_SITE_KEY_FRICTIONLESS,
|
|
110
|
+
),
|
|
96
111
|
"import.meta.env.PROSOPO_SERVER_URL": JSON.stringify(
|
|
97
112
|
process.env.PROSOPO_SERVER_URL,
|
|
98
113
|
),
|
|
99
114
|
"import.meta.env.VITE_BUNDLE_URL": JSON.stringify(
|
|
100
|
-
process.env.VITE_BUNDLE_URL ||
|
|
115
|
+
process.env.VITE_BUNDLE_URL ||
|
|
116
|
+
"http://localhost:9269/procaptcha.bundle.js",
|
|
101
117
|
),
|
|
102
118
|
},
|
|
103
119
|
optimizeDeps: {
|
|
@@ -110,6 +126,18 @@ export default defineConfig(({ command, mode }) => {
|
|
|
110
126
|
rollupOptions: {
|
|
111
127
|
input: {
|
|
112
128
|
index: path.resolve(__dirname, "src/index.html"),
|
|
129
|
+
"pow-explicit": path.resolve(__dirname, "src/pow-explicit.html"),
|
|
130
|
+
"image-explicit": path.resolve(__dirname, "src/image-explicit.html"),
|
|
131
|
+
"pow-implicit": path.resolve(__dirname, "src/pow-implicit.html"),
|
|
132
|
+
"image-implicit": path.resolve(__dirname, "src/index.html"),
|
|
133
|
+
"frictionless-implicit": path.resolve(
|
|
134
|
+
__dirname,
|
|
135
|
+
"src/frictionless-implicit.html",
|
|
136
|
+
),
|
|
137
|
+
"frictionless-explicit": path.resolve(
|
|
138
|
+
__dirname,
|
|
139
|
+
"src/frictionless-explicit.html",
|
|
140
|
+
),
|
|
113
141
|
"invisible-pow-explicit": path.resolve(
|
|
114
142
|
__dirname,
|
|
115
143
|
"src/invisible-pow-explicit.html",
|
|
@@ -126,8 +154,6 @@ export default defineConfig(({ command, mode }) => {
|
|
|
126
154
|
__dirname,
|
|
127
155
|
"src/invisible-image-implicit.html",
|
|
128
156
|
),
|
|
129
|
-
pow: path.resolve(__dirname, "src/pow.html"),
|
|
130
|
-
frictionless: path.resolve(__dirname, "src/frictionless.html"),
|
|
131
157
|
"invisible-frictionless-implicit": path.resolve(
|
|
132
158
|
__dirname,
|
|
133
159
|
"src/invisible-frictionless-implicit.html",
|
|
@@ -141,6 +167,9 @@ export default defineConfig(({ command, mode }) => {
|
|
|
141
167
|
},
|
|
142
168
|
plugins: [
|
|
143
169
|
navigationInjector(),
|
|
170
|
+
formFillerInjector(),
|
|
171
|
+
explanationInjector(),
|
|
172
|
+
statusLogInjector(),
|
|
144
173
|
{
|
|
145
174
|
name: "copy-files",
|
|
146
175
|
closeBundle() {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./modulepreload-polyfill-B5Qt9EMX.js";import{render as r}from"https://staging-js.prosopo.io/js/procaptcha.bundle.js";window.addEventListener("load",()=>{window.setIsError=e=>{const o=document.getElementById("messageContainer");o.style.color=e?"red":"black",o.style.display="block"},window.setMessage=e=>{document.getElementById("message").innerText=e},window.onLoggedIn=e=>{const o=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",e,"at",o),fetch(o,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${e}`}}).then(async n=>{try{const s=await n.json();n.status===200&&setMessage(s.message)}catch(s){console.log(s)}}).catch(n=>{console.log(n)})},window.onActionHandler=()=>{const e=document.getElementsByName("procaptcha-response");if(!e.length){alert("Must complete captcha");return}const o=e[0].value,n={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":o},s=new URL("signup",void 0).href;console.log("posting to",s,"with payload",n),fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),contentType:"application/json"}).then(t=>new Promise(a=>t.json().then(c=>a({status:t.status,ok:t.ok,json:c})))).then(async({status:t,json:a,ok:c})=>{console.log("status",t,"json",a.message,"ok",c),console.log("json",a);try{t!==200?(setIsError(!0),setMessage(a.message)):(setIsError(!1),setMessage(a.message))}catch(l){console.log(l)}}).catch(t=>{console.log(t),setIsError(!0),setMessage("Error: "+t)})},console.log("here")});function i(e){console.log("Challenge passed")}const d=document.getElementById("procaptcha-container");r(d,{siteKey:void 0,captchaType:"frictionless",theme:"dark",callback:i,"failed-callback":function(){console.log("Challenge failed")}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./modulepreload-polyfill-B5Qt9EMX.js";window.addEventListener("load",()=>{window.setIsError=e=>{const t=document.getElementById("messageContainer");t.style.color=e?"red":"black",t.style.display="block"},window.setMessage=e=>{document.getElementById("message").innerText=e},window.onLoggedIn=e=>{const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",e,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${e}`}}).then(async n=>{try{const s=await n.json();n.status===200&&setMessage(s.message)}catch(s){console.log(s)}}).catch(n=>{console.log(n)})},window.onActionHandler=()=>{const e=document.getElementsByName("procaptcha-response");if(!e.length){alert("Must complete captcha");return}const t=e[0].value,n={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},s=new URL("signup",void 0).href;console.log("posting to",s,"with payload",n),fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),contentType:"application/json"}).then(o=>new Promise(a=>o.json().then(l=>a({status:o.status,ok:o.ok,json:l})))).then(async({status:o,json:a,ok:l})=>{console.log("status",o,"json",a.message,"ok",l),console.log("json",a);try{o!==200?(setIsError(!0),setMessage(a.message)):(setIsError(!1),setMessage(a.message))}catch(c){console.log(c)}}).catch(o=>{console.log(o),setIsError(!0),setMessage("Error: "+o)})}});window.onCaptchaFailed=function(){console.log("Challenge failed")};window.onCaptchaVerified=e=>{console.log("Challenge passed")};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./modulepreload-polyfill-B5Qt9EMX.js";import"https://staging-js.prosopo.io/js/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){if(window.procaptcha&&typeof window.procaptcha.render=="function")onloadCallback();else{const o=document.querySelector('script[src*="procaptcha.bundle.js"]');o&&o.addEventListener("load",onloadCallback)}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./modulepreload-polyfill-B5Qt9EMX.js";import"https://staging-js.prosopo.io/js/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){if(window.procaptcha&&typeof window.procaptcha.render=="function")onloadCallback();else{const o=document.querySelector('script[src*="procaptcha.bundle.js"]');o&&o.addEventListener("load",onloadCallback)}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./modulepreload-polyfill-B5Qt9EMX.js";import"https://staging-js.prosopo.io/js/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){if(window.procaptcha&&typeof window.procaptcha.render=="function")onloadCallback();else{const o=document.querySelector('script[src*="procaptcha.bundle.js"]');o&&o.addEventListener("load",onloadCallback)}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./modulepreload-polyfill-B5Qt9EMX.js";const p="modulepreload",w=function(o){return"/"+o},d={},y=function(i,c,v){let s=Promise.resolve();if(c&&c.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),t=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));s=Promise.allSettled(c.map(n=>{if(n=w(n),n in d)return;d[n]=!0;const a=n.endsWith(".css"),f=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${f}`))return;const r=document.createElement("link");if(r.rel=a?"stylesheet":p,a||(r.as="script"),r.crossOrigin="",r.href=n,t&&r.setAttribute("nonce",t),document.head.appendChild(r),a)return new Promise((h,m)=>{r.addEventListener("load",h),r.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${n}`)))})}))}function l(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return s.then(e=>{for(const t of e||[])t.status==="rejected"&&l(t.reason);return i().catch(l)})};async function E(){const o=(await y(async()=>{const{render:c}=await import("https://staging-js.prosopo.io/js/procaptcha.bundle.js");return{render:c}},[])).render;console.log("Captcha loaded");const i=document.getElementById("procaptcha-container");o(i,{siteKey:void 0,theme:"dark",callback:u,captchaType:"pow"})}window.captchaLoaded=E;function u(o){console.log("Captcha verified, output: "+JSON.stringify(o))}window.onCaptchaVerified=u;
|
package/dist/frictionless.html
DELETED
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<link href="https://cdn.muicss.com/mui-0.10.3/css/mui.min.css" rel="stylesheet" type="text/css"/>
|
|
5
|
-
<title>Procaptcha demo: Simple page</title>
|
|
6
|
-
<script type="text/javascript">
|
|
7
|
-
window.onCaptchaFailed = function () {
|
|
8
|
-
console.log('Challenge failed')
|
|
9
|
-
}
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<style>
|
|
14
|
-
.nav-topbar {
|
|
15
|
-
background-color: #2196F3;
|
|
16
|
-
padding: 0;
|
|
17
|
-
margin-bottom: 20px;
|
|
18
|
-
transition: all 0.3s ease;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
max-height: 500px; /* Initial state - visible */
|
|
21
|
-
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
|
22
|
-
}
|
|
23
|
-
.nav-topbar.collapsed {
|
|
24
|
-
max-height: 50px; /* Collapsed state - only show toggle button and title */
|
|
25
|
-
}
|
|
26
|
-
.nav-container {
|
|
27
|
-
max-width: 1200px;
|
|
28
|
-
margin: 0 auto;
|
|
29
|
-
padding: 0 15px;
|
|
30
|
-
position: relative;
|
|
31
|
-
}
|
|
32
|
-
.nav-header {
|
|
33
|
-
display: flex;
|
|
34
|
-
justify-content: space-between;
|
|
35
|
-
align-items: center;
|
|
36
|
-
padding: 10px 0;
|
|
37
|
-
position: relative;
|
|
38
|
-
z-index: 20;
|
|
39
|
-
}
|
|
40
|
-
.nav-title {
|
|
41
|
-
color: white;
|
|
42
|
-
font-size: 18px;
|
|
43
|
-
font-weight: bold;
|
|
44
|
-
margin: 0;
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
}
|
|
48
|
-
.nav-title-text {
|
|
49
|
-
margin-right: 10px;
|
|
50
|
-
}
|
|
51
|
-
.nav-title-hint {
|
|
52
|
-
font-size: 14px;
|
|
53
|
-
font-weight: normal;
|
|
54
|
-
opacity: 0;
|
|
55
|
-
transition: opacity 0.3s ease;
|
|
56
|
-
}
|
|
57
|
-
.collapsed .nav-title-hint {
|
|
58
|
-
opacity: 0.8;
|
|
59
|
-
}
|
|
60
|
-
.nav-toggle {
|
|
61
|
-
background-color: rgba(0,0,0,0.1);
|
|
62
|
-
color: white;
|
|
63
|
-
border: none;
|
|
64
|
-
padding: 5px 10px;
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
border-radius: 4px;
|
|
67
|
-
z-index: 10;
|
|
68
|
-
display: flex;
|
|
69
|
-
align-items: center;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
}
|
|
72
|
-
.nav-toggle:hover {
|
|
73
|
-
background-color: rgba(0,0,0,0.2);
|
|
74
|
-
}
|
|
75
|
-
.nav-toggle-icon {
|
|
76
|
-
width: 24px;
|
|
77
|
-
height: 24px;
|
|
78
|
-
display: inline-block;
|
|
79
|
-
position: relative;
|
|
80
|
-
}
|
|
81
|
-
.nav-toggle-icon svg {
|
|
82
|
-
position: absolute;
|
|
83
|
-
top: 0;
|
|
84
|
-
left: 0;
|
|
85
|
-
transition: opacity 0.3s ease;
|
|
86
|
-
}
|
|
87
|
-
.nav-toggle-icon .icon-collapse {
|
|
88
|
-
opacity: 1;
|
|
89
|
-
}
|
|
90
|
-
.nav-toggle-icon .icon-expand {
|
|
91
|
-
opacity: 0;
|
|
92
|
-
}
|
|
93
|
-
.collapsed .nav-toggle-icon .icon-collapse {
|
|
94
|
-
opacity: 0;
|
|
95
|
-
}
|
|
96
|
-
.collapsed .nav-toggle-icon .icon-expand {
|
|
97
|
-
opacity: 1;
|
|
98
|
-
}
|
|
99
|
-
.nav-content {
|
|
100
|
-
padding: 0 0 15px 0;
|
|
101
|
-
transition: opacity 0.3s ease;
|
|
102
|
-
}
|
|
103
|
-
.collapsed .nav-content {
|
|
104
|
-
opacity: 0;
|
|
105
|
-
}
|
|
106
|
-
.nav-row {
|
|
107
|
-
display: flex;
|
|
108
|
-
flex-wrap: wrap;
|
|
109
|
-
margin-bottom: 15px;
|
|
110
|
-
}
|
|
111
|
-
.nav-group {
|
|
112
|
-
flex: 1;
|
|
113
|
-
min-width: 250px;
|
|
114
|
-
margin-bottom: 10px;
|
|
115
|
-
margin-right: 20px;
|
|
116
|
-
}
|
|
117
|
-
.nav-group-title {
|
|
118
|
-
color: rgba(255,255,255,0.8);
|
|
119
|
-
font-size: 0.9em;
|
|
120
|
-
margin: 0 0 5px 0;
|
|
121
|
-
text-transform: uppercase;
|
|
122
|
-
font-weight: 500;
|
|
123
|
-
}
|
|
124
|
-
.nav-group-links {
|
|
125
|
-
list-style: none;
|
|
126
|
-
margin: 0;
|
|
127
|
-
padding: 0;
|
|
128
|
-
}
|
|
129
|
-
.nav-group-links li {
|
|
130
|
-
margin: 5px 0;
|
|
131
|
-
}
|
|
132
|
-
.nav-group-links a {
|
|
133
|
-
color: white;
|
|
134
|
-
text-decoration: none;
|
|
135
|
-
font-weight: bold;
|
|
136
|
-
padding: 5px 0;
|
|
137
|
-
display: inline-block;
|
|
138
|
-
}
|
|
139
|
-
.nav-group-links a:hover {
|
|
140
|
-
text-decoration: underline;
|
|
141
|
-
}
|
|
142
|
-
.nav-group-links .active {
|
|
143
|
-
border-bottom: 2px solid white;
|
|
144
|
-
}
|
|
145
|
-
.nav-group-links .disabled {
|
|
146
|
-
color: rgba(255,255,255,0.5);
|
|
147
|
-
cursor: not-allowed;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
@media (max-width: 768px) {
|
|
151
|
-
.nav-row {
|
|
152
|
-
flex-direction: column;
|
|
153
|
-
}
|
|
154
|
-
.nav-title-hint {
|
|
155
|
-
display: none;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
</style>
|
|
159
|
-
<script type="module" crossorigin src="/assets/frictionless-ZgzyuneX.js"></script>
|
|
160
|
-
<link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-B5Qt9EMX.js">
|
|
161
|
-
</head>
|
|
162
|
-
<body>
|
|
163
|
-
|
|
164
|
-
<div id="nav-topbar" class="nav-topbar">
|
|
165
|
-
<div class="nav-container">
|
|
166
|
-
<div id="nav-header" class="nav-header">
|
|
167
|
-
<h1 class="nav-title">
|
|
168
|
-
<span class="nav-title-text">Procaptcha Demo Playground</span>
|
|
169
|
-
<span class="nav-title-hint">(Click anywhere to see more examples)</span>
|
|
170
|
-
</h1>
|
|
171
|
-
<button id="nav-toggle" class="nav-toggle" aria-label="Toggle navigation">
|
|
172
|
-
<span class="nav-toggle-icon">
|
|
173
|
-
<svg class="icon-collapse" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
174
|
-
<polyline points="18 15 12 9 6 15"></polyline>
|
|
175
|
-
</svg>
|
|
176
|
-
<svg class="icon-expand" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
177
|
-
<polyline points="6 9 12 15 18 9"></polyline>
|
|
178
|
-
</svg>
|
|
179
|
-
</span>
|
|
180
|
-
</button>
|
|
181
|
-
</div>
|
|
182
|
-
<div class="nav-content">
|
|
183
|
-
<div class="nav-row">
|
|
184
|
-
|
|
185
|
-
<div class="nav-section">
|
|
186
|
-
<h3 style="color: white; margin: 0 0 10px 0;">Standard Captchas</h3>
|
|
187
|
-
<div class="nav-row">
|
|
188
|
-
|
|
189
|
-
<div class="nav-group">
|
|
190
|
-
<div class="nav-group-title">Image</div>
|
|
191
|
-
<ul class="nav-group-links">
|
|
192
|
-
<li><a href="index.html">Implicit</a></li>
|
|
193
|
-
<li><span class="disabled" title="Coming Soon">Explicit</span></li>
|
|
194
|
-
</ul>
|
|
195
|
-
</div>
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
<div class="nav-group">
|
|
199
|
-
<div class="nav-group-title">Pow</div>
|
|
200
|
-
<ul class="nav-group-links">
|
|
201
|
-
<li><span class="disabled" title="Coming Soon">Implicit</span></li>
|
|
202
|
-
<li><span class="disabled" title="Coming Soon">Explicit</span></li>
|
|
203
|
-
</ul>
|
|
204
|
-
</div>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
<div class="nav-group">
|
|
208
|
-
<div class="nav-group-title">Frictionless</div>
|
|
209
|
-
<ul class="nav-group-links">
|
|
210
|
-
<li><span class="disabled" title="Coming Soon">Implicit</span></li>
|
|
211
|
-
<li><a href="frictionless-explicit.html">Explicit</a></li>
|
|
212
|
-
</ul>
|
|
213
|
-
</div>
|
|
214
|
-
|
|
215
|
-
</div>
|
|
216
|
-
</div>
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
<div class="nav-section">
|
|
220
|
-
<h3 style="color: white; margin: 0 0 10px 0;">Invisible Captchas</h3>
|
|
221
|
-
<div class="nav-row">
|
|
222
|
-
|
|
223
|
-
<div class="nav-group">
|
|
224
|
-
<div class="nav-group-title">Image</div>
|
|
225
|
-
<ul class="nav-group-links">
|
|
226
|
-
<li><a href="invisible-image-implicit.html">Implicit</a></li>
|
|
227
|
-
<li><a href="invisible-image-explicit.html">Explicit</a></li>
|
|
228
|
-
</ul>
|
|
229
|
-
</div>
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
<div class="nav-group">
|
|
233
|
-
<div class="nav-group-title">Pow</div>
|
|
234
|
-
<ul class="nav-group-links">
|
|
235
|
-
<li><a href="invisible-pow-implicit.html">Implicit</a></li>
|
|
236
|
-
<li><a href="invisible-pow-explicit.html">Explicit</a></li>
|
|
237
|
-
</ul>
|
|
238
|
-
</div>
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
<div class="nav-group">
|
|
242
|
-
<div class="nav-group-title">Frictionless</div>
|
|
243
|
-
<ul class="nav-group-links">
|
|
244
|
-
<li><a href="invisible-frictionless-implicit.html">Implicit</a></li>
|
|
245
|
-
<li><a href="invisible-frictionless-explicit.html">Explicit</a></li>
|
|
246
|
-
</ul>
|
|
247
|
-
</div>
|
|
248
|
-
|
|
249
|
-
</div>
|
|
250
|
-
</div>
|
|
251
|
-
|
|
252
|
-
</div>
|
|
253
|
-
</div>
|
|
254
|
-
</div>
|
|
255
|
-
</div>
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
<div class="mui-container">
|
|
259
|
-
<form action="undefined/signup" method="POST" class="mui-form">
|
|
260
|
-
<h1>Example Login Form</h1>
|
|
261
|
-
<div class="mui-textfield mui-textfield--float-label">
|
|
262
|
-
<label for="name">Name</label>
|
|
263
|
-
<input id="name" type="text" name="name" required/>
|
|
264
|
-
</div>
|
|
265
|
-
<div class="mui-textfield mui-textfield--float-label">
|
|
266
|
-
<label for="email">Email Address</label>
|
|
267
|
-
<input id="email" type="email" name="email" required/>
|
|
268
|
-
</div>
|
|
269
|
-
<div class="mui-textfield mui-textfield--float-label">
|
|
270
|
-
<label for="password">Password</label>
|
|
271
|
-
<input id="password" type="password" name="password" required/>
|
|
272
|
-
</div>
|
|
273
|
-
<div class="mui-textfield mui-textfield--float-label">
|
|
274
|
-
<div id="procaptcha-container"></div>
|
|
275
|
-
</div>
|
|
276
|
-
<div id="messageContainer" style="display: none; color: black;"><span id="message"></span></div>
|
|
277
|
-
<button type="button" class="mui-btn mui-btn--raised" onclick="onActionHandler()" data-cy="submit-button">Submit</button>
|
|
278
|
-
</form>
|
|
279
|
-
</div>
|
|
280
|
-
|
|
281
|
-
<script>
|
|
282
|
-
document.addEventListener('DOMContentLoaded', function() {
|
|
283
|
-
const toggleBtn = document.getElementById('nav-toggle');
|
|
284
|
-
const navBar = document.getElementById('nav-topbar');
|
|
285
|
-
const navHeader = document.getElementById('nav-header');
|
|
286
|
-
|
|
287
|
-
// Check if navigation was previously collapsed
|
|
288
|
-
const navCollapsed = localStorage.getItem('navCollapsed') === 'true';
|
|
289
|
-
if (navCollapsed) {
|
|
290
|
-
navBar.classList.add('collapsed');
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// Function to expand the navigation
|
|
294
|
-
function expandNav() {
|
|
295
|
-
if (navBar.classList.contains('collapsed')) {
|
|
296
|
-
navBar.classList.remove('collapsed');
|
|
297
|
-
localStorage.setItem('navCollapsed', 'false');
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
// Function to collapse the navigation
|
|
302
|
-
function collapseNav() {
|
|
303
|
-
if (!navBar.classList.contains('collapsed')) {
|
|
304
|
-
navBar.classList.add('collapsed');
|
|
305
|
-
localStorage.setItem('navCollapsed', 'true');
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
// Function to toggle the navigation
|
|
310
|
-
function toggleNav() {
|
|
311
|
-
navBar.classList.toggle('collapsed');
|
|
312
|
-
localStorage.setItem('navCollapsed', navBar.classList.contains('collapsed'));
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
// Toggle on button click
|
|
316
|
-
toggleBtn.addEventListener('click', function(e) {
|
|
317
|
-
e.stopPropagation(); // Prevent header click from firing
|
|
318
|
-
toggleNav();
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
// Expand on toggle button hover when collapsed
|
|
322
|
-
toggleBtn.addEventListener('mouseenter', function() {
|
|
323
|
-
if (navBar.classList.contains('collapsed')) {
|
|
324
|
-
expandNav();
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
|
|
328
|
-
// Toggle on header click
|
|
329
|
-
navHeader.addEventListener('click', function(e) {
|
|
330
|
-
// Don't toggle if a link within the header was clicked
|
|
331
|
-
if (e.target.tagName === 'A') {
|
|
332
|
-
return;
|
|
333
|
-
}
|
|
334
|
-
toggleNav();
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
// Make the header appear clickable with cursor style
|
|
338
|
-
navHeader.style.cursor = 'pointer';
|
|
339
|
-
});
|
|
340
|
-
</script>
|
|
341
|
-
|
|
342
|
-
</body>
|
|
343
|
-
</html>
|