-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDescribePhoto.html
More file actions
157 lines (131 loc) · 2.86 KB
/
DescribePhoto.html
File metadata and controls
157 lines (131 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Human Verification</title>
<style>
body {
font-family: Arial, sans-serif;
background: #f2f2f2;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.captcha-box {
background: white;
width: 360px;
padding: 16px;
border-radius: 4px;
box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.title {
font-size: 14px;
margin-bottom: 8px;
}
.image-wrapper {
width: 100%;
height: 220px;
background: #ddd;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 10px;
overflow: hidden;
}
.image-wrapper img {
width: 100%;
height: 100%;
object-fit: cover;
}
textarea {
width: 100%;
height: 60px;
resize: none;
padding: 6px;
box-sizing: border-box;
font-size: 13px;
}
.status {
font-size: 12px;
color: #666;
margin-top: 6px;
min-height: 16px;
}
button {
margin-top: 10px;
width: 100%;
padding: 9px;
font-size: 14px;
cursor: pointer;
background: #1a73e8;
color: white;
border: none;
border-radius: 3px;
}
button:hover {
background: #1765cc;
}
button:disabled {
background: #8ab4f8;
cursor: default;
}
.error {
color: #d93025;
}
.spinner {
display: inline-block;
width: 12px;
height: 12px;
border: 2px solid #ccc;
border-top: 2px solid #555;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-right: 6px;
vertical-align: middle;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div class="captcha-box">
<div class="title">Describe the image to verify you are human</div>
<div class="image-wrapper">
<img id="captchaImage" alt="Verification image">
</div>
<textarea id="description" placeholder="Describe what you see in the image..."></textarea>
<button id="submitBtn">Verify</button>
<div class="status" id="status"></div>
</div>
<script>
const img = document.getElementById("captchaImage");
const textarea = document.getElementById("description");
const status = document.getElementById("status");
const button = document.getElementById("submitBtn");
function loadNewImage() {
const seed = Math.random().toString(36).slice(2);
img.src = `https://picsum.photos/400/300?random=${seed}`;
}
function fakeVerify() {
const text = textarea.value.trim();
if (!text) {
status.innerHTML = '<span class="error">Description required. Please describe the image before continuing.</span>';
return;
}
status.innerHTML = '<span class="spinner"></span>Analyzing description...';
button.disabled = true;
setTimeout(() => {
status.textContent = "Additional verification required. Please describe the next image.";
textarea.value = "";
loadNewImage();
button.disabled = false;
}, 1800);
}
button.addEventListener("click", fakeVerify);
loadNewImage();
</script>
</body>
</html>