-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
97 lines (88 loc) · 4.86 KB
/
index.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
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="signup.css">
<link rel="shortcut icon" href="favicon.png">
<link href="https://fonts.googleapis.com/css?family=Poppins:300&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1, height=device-height" />
<title>Kahoot Bot Service - totally legit</title>
<!--meta tags from metatags.io-->
<meta name="title" content="Kahoot! Bot">
<meta name="description" content="Make up to 150 Kahoot bots to play in your game. Simply type in the game pin, the name of the bot, and how many you want for hours of automated gaming fun!">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://kahootbots.gq/">
<meta property="og:title" content="Kahoot! Bot">
<meta property="og:description" content="Make up to 150 Kahoot bots to play in your game. Simply type in the game pin, the name of the bot, and how many you want for hours of automated gaming fun!">
<meta property="og:image" content="favicon.png">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://kahootbots.gq/">
<meta property="twitter:title" content="Kahoot! Bot">
<meta property="twitter:description" content="Make up to 150 Kahoot bots to play in your game. Simply type in the game pin, the name of the bot, and how many you want for hours of automated gaming fun!">
<meta property="twitter:image" content="favicon.png">
<script>
function checkinput(data) {
if (data.keyCode == 13) {
sendbots()
}
}
function init() {
fetch("/bot_count")
.then(a => a.json())
.then(response => {
console.log(response)
document.getElementById("over500").innerHTML = "Playing over " + (response.game_count - 1) + " games"
})
}
function sendbots() {
if (validateform()) {
// do stuff
var gamepin = document.getElementById("gamepin").value;
var bot_count = document.getElementById("bot_count").value;
var bot_name = document.getElementById("bot_name").value;
document.getElementById("output").innerHTML = "<p id='subbed'>Working...</p>";
fetch("/endpoint/" + gamepin + "/" + bot_count + "/" + bot_name)
.then(a => a.json())
.then(response => {
if (response.success) {
document.getElementById("output").innerHTML = "<p id='subbed'>Done! Bots should join momentarily</p>";
} else {
document.getElementById("output").innerHTML = "<p id='notsubbed'>Error. Try again.</p>";
}
})
}
}
function validateform() {
if (String(Number(document.getElementById("gamepin").value)) == "NaN" || document.getElementById("gamepin").value == null || document.getElementById("gamepin").value == "") {
document.getElementById("output").innerHTML = "<p id='notsubbed'>Invalid game pin</p>";
return false
}
if (String(Number(document.getElementById("bot_count").value)) == "NaN" || Number(document.getElementById("bot_count").value) > 150 || document.getElementById("bot_count").value == null || document.getElementById("bot_count").value == "" || Number(document.getElementById("bot_count").value) < 1) {
document.getElementById("output").innerHTML = "<p id='notsubbed'>Bot count must be a number bewtween 1 and 150</p>";
return false
}
if (document.getElementById("bot_name").value == null || document.getElementById("bot_name").value == "") {
document.getElementById("output").innerHTML = "<p id='notsubbed'>Bot name must exist</p>";
return false
}
return true
}
</script>
</head>
<body onload="init()">
<h1 id="signup">KahootBot</h1>
<p style="width: 100%; text-align: center; font-family:sans-serif; font-size: 20px; margin-top: -50px;">Super legit
kahoot bot</p>
<span class="spnn"></span>
<input placeholder="Pin" onkeypress="checkinput(event)" id="gamepin">
<input placeholder="Bot Name" onkeypress="checkinput(event)" id="bot_name">
<input placeholder="Bots" onkeypress="checkinput(event)" id="bot_count" value="50">
<span class="spnn"></span>
<div class="br"></div>
<div class="openbutton" onclick="sendbots()"><span style="vertical-align: middle; display: inline-block; line-height: 50px;">Send Bots!</span></div>
<div id="output"></div>
<br><br>
<h2 id="over500"></h2>
</body>
</html>