-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcaptcha.html
32 lines (32 loc) · 1.62 KB
/
captcha.html
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
<!DOCTYPE html>
<html><head><meta name="viewport" content="width=device-width,initial-scale=1.0" /><link href="style.css" rel="stylesheet" type="text/css" /></head><body>
<style>body, html{margin:0; padding: 0;}</style>
<div id="base-captcha" style="display: inline-block; border: 2px solid gray; background-color: white; font-size: 16px; padding: 7px;" onclick="answer()">[?] I'm not a Morone</div>
<div style="display: none; border: 2px solid gray; background-color: white; font-size: 16px; padding: 7px;" id="question"><form onsubmit="submitCaptcha()" action="javascript:;"><nobr><input style="font-size: 14px; padding: none; outline: none;" id="captcha" placeholder="Long S (1 / (1 + x^2)) dx" size="25" onkeydown="if (event.keyCode === 13) submitCaptcha()" />
<input type="submit" value="Soobmit" onclick="submitCaptcha()" /></nobr>
</form></div>
<div hidden="hidden" id="completeHandler"></div>
<div hidden="hidden" id="incorrectHandler"></div>
<script>
function answer() {
document.getElementById('base-captcha').style.display = 'none';
document.querySelector('#question').style.display = 'inline-block';
}
function submitCaptcha() {
console.log('Submitting');
if (document.getElementById('captcha').value.toLowerCase() === "illuminati") {
console.log('Right');
submitRight();
} else {
console.log('Wrong');
submitWrong();
}
}
function submitRight() {
document.getElementById('completeHandler').click();
}
function submitWrong() {
document.getElementById('incorrectHandler').click();
}
</script>
</body></html>