-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu2.html
58 lines (53 loc) · 2.24 KB
/
menu2.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
<!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">
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.1.3/axios.min.js" integrity="sha512-0qU9M9jfqPw6FKkPafM3gy2CBAvUWnYVOfNPDYKVuRTel1PrciTj+a9P3loJB+j0QmN2Y0JYQmkBBS8W+mbezg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<title>NGL-Spam</title>
</head>
<body>
<h1 style="padding: 0; margin: 0;">NGL-Spam</h1>
<p style="margin: 0;">by Asada</p>
<div style="display: flex; margin-top: 30px;">
<p style="margin: 0;">Input target username:</p>
<input id="username" type="text" style="margin-left: 10px;" required>
</div>
<div style="display: flex; margin-top: 10px;">
<p style="margin: 0;">Input Message:</p>
<input id="message" type="text" style="margin-left: 10px;" required>
</div>
<div style="display: flex; margin-top: 10px;">
<p style="margin: 0;">Input amount of Message:</p>
<input id="amount" type="text" style="margin-left: 10px; width: 25px;" required>
</div>
<button id="submit" style="margin: 15px;">Spam now!</button>
<div id="notify"></div>
<script>
let username = document.getElementById("username");
let message = document.getElementById("message");
let amount = document.getElementById("amount");
let submit = document.getElementById("submit");
submit.addEventListener("click", (e) => {
if(username.value === "") {
notify.innerHTML = "<p>Failed, username can't be empty</p>";
return;
} else if(message.value === "") {
notify.innerHTML = "<p>Failed, message can't be empty</p>";
return
} else if(isNaN(amount.value)) {
notify.innerHTML = "<p>Failed, amount must be a number</p>";
return
};
axios.post(`https://ngl-spam.asada.my.id:8000/api/custom?username=${username.value}&message=${message.value}&amount=${amount.value}`).then((res) => {
console.log(res);
username.value = "";
message.value = "";
amount.value = "";
notify.innerHTML = "<p>Success Spam!</p>";
});
});
</script>
</body>
</html>