-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
72 lines (68 loc) · 2.22 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tidy Tab Groups Discord Update Sender</title>
<style>
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background-color: #121212;
color: #e0e0e0;
font-family: Arial, sans-serif;
}
button {
color: #1e90ff;
font-size: 2rem;
text-decoration: none;
padding: 0.5em 1em;
border: 2px solid #1e90ff;
border-radius: 8px;
transition: background-color 0.3s, color 0.3s;
}
input {
color: #1e90ff;
font-size: 2rem;
text-decoration: none;
padding: 0.5em 1em;
border: 2px solid #1e90ff;
border-radius: 8px;
transition: background-color 0.3s, color 0.3s;
}
button:hover {
background-color: #1e90ff;
color: #121212;
}
</style>
</head>
<body>
<form id="messageForm">
<input type="text" id="messageInput" placeholder="Enter your message" required>
<button type="submit">Send Message</button>
</form>
<script>
document.getElementById('messageForm').addEventListener('submit', async (e) => {
e.preventDefault();
const message = document.getElementById('messageInput').value;
const webhookURL = 'https://discord.com/api/webhooks/1300744831651282984/nlBYXjIzlssMmc3KllJlc39mktEYowJDJtXlg92uiOFxniU8AH1xbxc_nu8tdHGYR75s';
const response = await fetch(webhookURL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ content: message }),
});
if (response.ok) {
alert('Update sent!');
document.getElementById('messageInput').value = '';
} else {
alert('Failed to send update. Please try again.');
}
});
</script>
</body>
</html>