Skip to content

Commit 01a6236

Browse files
authored
Create index.html
0 parents  commit 01a6236

File tree

1 file changed

+125
-0
lines changed

1 file changed

+125
-0
lines changed

index.html

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Webhook Management</title>
8+
<style>
9+
body {
10+
text-align: center;
11+
color: #fff;
12+
background-image: url('background_image.jpg');
13+
background-size: cover;
14+
font-family: Arial, sans-serif;
15+
margin: 0;
16+
padding: 0;
17+
display: flex;
18+
flex-direction: column;
19+
min-height: 100vh;
20+
}
21+
22+
main {
23+
flex: 1;
24+
display: flex;
25+
flex-direction: column;
26+
justify-content: center;
27+
align-items: center;
28+
}
29+
30+
.button {
31+
height: 40px;
32+
width: 200px;
33+
background-color: #070edb;
34+
border-radius: 20px;
35+
border: none;
36+
color: #fff;
37+
font-size: 16px;
38+
cursor: pointer;
39+
transition: background-color 0.3s ease;
40+
margin-bottom: 10px;
41+
}
42+
43+
.button:hover {
44+
background-color: #999;
45+
}
46+
47+
#deleteWebhookBtn {
48+
background-color: #ff0000;
49+
}
50+
51+
#footer {
52+
position: fixed;
53+
bottom: 0;
54+
left: 0;
55+
width: 100%;
56+
background-color: rgba(0, 0, 0, 0.5);
57+
color: #ccc;
58+
font-size: 14px;
59+
padding: 10px 0;
60+
}
61+
62+
#footer a {
63+
color: #ccc;
64+
text-decoration: none;
65+
transition: color 0.3s ease;
66+
}
67+
68+
#footer a:hover {
69+
color: #fff;
70+
}
71+
</style>
72+
</head>
73+
74+
<body>
75+
76+
<main>
77+
<button onclick="createWebhook()" class="button">Create Webhook</button>
78+
<br>
79+
<button onclick="deleteWebhook()" class="button" id="deleteWebhookBtn">Delete Webhook</button>
80+
</main>
81+
82+
<footer id="footer">
83+
<p>Made with ❤️ by <a href="https://t.me/ZORO2045">ፚ Ꭷ Ꮢ Ꭷ ❥</a></p>
84+
</footer>
85+
86+
<script>
87+
function createWebhook() {
88+
var token = prompt("Enter your token:");
89+
var fileUrl = prompt("Enter file URL:");
90+
var request = new XMLHttpRequest();
91+
request.open('POST', 'https://api.telegram.org/bot' + token + '/setwebhook?url=' + fileUrl, true);
92+
request.onload = function() {
93+
if (request.status >= 200 && request.status < 400) {
94+
alert("Webhook created successfully!");
95+
} else {
96+
alert("Failed to create webhook!");
97+
}
98+
};
99+
request.onerror = function() {
100+
alert("An error occurred while processing your request!");
101+
};
102+
request.send();
103+
}
104+
105+
function deleteWebhook() {
106+
var token = prompt("Enter your token:");
107+
var request = new XMLHttpRequest();
108+
request.open('GET', 'https://api.telegram.org/bot' + token + '/deleteWebhook', true);
109+
request.onload = function() {
110+
if (request.status >= 200 && request.status < 400) {
111+
alert("Webhook deleted successfully!");
112+
} else {
113+
alert("Failed to delete webhook!");
114+
}
115+
};
116+
request.onerror = function() {
117+
alert("An error occurred while processing your request!");
118+
};
119+
request.send();
120+
}
121+
</script>
122+
123+
</body>
124+
125+
</html>

0 commit comments

Comments
 (0)