-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmit.html
More file actions
88 lines (78 loc) · 2.03 KB
/
submit.html
File metadata and controls
88 lines (78 loc) · 2.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Bot</title>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<style>
body {
background-color: #222222;
}
p, h1, input {
color: #dddddd;
font-family: monospace;
}
p, h1 {
text-align: center;
}
h1 {
font-size: 36px;
}
p {
font-size: 24px;
}
input {
font-size: 24px;
width: 100%;
background-color: #ffffff20;
border: none;
}
input::placeholder {
color: #999999;
}
input[type=submit] {
border: none;
border-radius: 2px;
background-color: #0d47a1;
}
form {
display: flex;
width: 75%;
margin: auto;
flex-direction: column;
align-items: center;
}
.hidden {
display: none;
}
.error {
color: #ec407a;
}
</style>
</head>
<body>
<h1>Admin Bot for $NAME</h1>
<p id="msg" class="hidden"></p>
<form action="/$NAME" method="POST">
<input type="text" placeholder="url to submit" name="url">
<br>
<div class="g-recaptcha" data-sitekey="$RECAPTCHA_SITE"></div>
<br>
<input type="submit" value="Submit">
</form>
<script defer>
const qs = new URLSearchParams(location.search);
const msg = document.getElementById("msg");
if (qs.get("e")) {
msg.innerText = qs.get("e");
msg.classList.remove("hidden");
msg.classList.add("error");
} else if (qs.get("m")) {
msg.innerText = qs.get("m");
msg.classList.remove("hidden");
}
</script>
</body>
</html>