-
Notifications
You must be signed in to change notification settings - Fork 0
/
form.html
57 lines (54 loc) · 1.23 KB
/
form.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
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
<!DOCTYPE html>
<html>
<head>
<title>RobustIRC CAPTCHA</title>
<style type="text/css">
{{ template "font.css" }}
body {
font-family: "Open Sans";
}
#content {
text-align: center;
}
#content > * {
margin-left:auto;
margin-right:auto
}
</style>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script type="text/javascript">
function onload() {
document.getElementById('challenge').value = window.location.hash.substr(1);
}
function solved() {
document.getElementById('form').submit();
}
</script>
</head>
<body onload="onload()">
<noscript>
<p>You need to enable JavaScript for this page.</p>
</noscript>
{{ if ne .Msg "" }}
<p style="text-width: bold">
{{ .Msg }}
</p>
{{ end }}
<div id="content">
<p>
Sorry for the inconvenience!
</p>
<p>
In order to protect our IRC network from spammers,<br>
solving a CAPTCHA is currently required to log in.
</p>
<p>
Please solve the following CAPTCHA:
</p>
<form action="/submit" method="POST" id="form" style="width: 304px">
<input type="hidden" name="challenge" id="challenge">
<div class="g-recaptcha" data-sitekey="{{ .SiteKey }}" data-callback="solved"></div>
</form>
</div>
</body>
</html>