55 < meta charset ="UTF-8 ">
66 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
77 < title > Webhook Management</ title >
8+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css "
9+ integrity ="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg== "
10+ crossorigin ="anonymous " referrerpolicy ="no-referrer " />
811 < style >
912 body {
1013 text-align : center;
1922 flex-direction : column;
2023 min-height : 100vh ;
2124 }
25+
2226 main {
2327 flex : 1 ;
2428 display : flex;
2529 flex-direction : column;
2630 justify-content : center;
2731 align-items : center;
2832 }
33+
2934 .button {
3035 height : 50px ;
3136 width : 220px ;
3944 box-shadow : 0 4px 15px rgba (0 , 0 , 0 , 0.2 );
4045 transition : background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
4146 user-select : none;
47+ display : flex;
48+ align-items : center;
49+ justify-content : center;
50+ }
51+ .button i {
52+ margin-right : 10px ;
4253 }
54+
4355 # createWebhookBtn {
4456 color : # 00FF00 ;
4557 border-color : # 00FF00 ;
4658 }
59+
4760 # createWebhookBtn : hover {
4861 background : # 00FF00 ;
4962 color : # 000 ;
5063 }
64+
5165 # deleteWebhookBtn {
5266 color : # FF0000 ;
5367 border-color : # FF0000 ;
5468 }
69+
5570 # deleteWebhookBtn : hover {
5671 background : # FF0000 ;
5772 color : # 000 ;
5873 }
74+
5975 # getBotInfoBtn {
6076 color : # 0000FF ;
6177 border-color : # 0000FF ;
6278 }
79+
6380 # getBotInfoBtn : hover {
6481 background : # 0000FF ;
6582 color : # 000 ;
6683 }
84+
6785 # clearPendingRequestsBtn {
6886 color : # FFA500 ;
6987 border-color : # FFA500 ;
7088 }
89+
7190 # clearPendingRequestsBtn : hover {
7291 background : # FFA500 ;
7392 color : # 000 ;
7493 }
94+
7595 footer {
7696 position : fixed;
7797 bottom : 0 ;
89109 text-decoration : none;
90110 font-size : 1rem ;
91111 }
92-
112+
93113 # modal {
94114 display : none;
95115 position : fixed;
102122 background-color : rgba (0 , 0 , 0 , 0.7 );
103123 padding-top : 60px ;
104124 }
125+
105126 # modalContent {
106127 background-color : # 282c34 ;
107128 margin : 5% auto;
112133 text-align : left;
113134 border-radius : 10px ;
114135 }
136+
115137 # closeModal {
116138 color : # aaa ;
117139 float : right;
118140 font-size : 28px ;
119141 font-weight : bold;
120142 }
143+
121144 # closeModal : hover ,
122145 # closeModal : focus {
123146 color : # fff ;
124147 text-decoration : none;
125148 cursor : pointer;
126149 }
150+
127151 pre {
128152 white-space : pre-wrap;
129153 word-wrap : break-word;
132156 background-color : # 1e1e1e ;
133157 border-radius : 5px ;
134158 }
159+
135160 @media (max-width : 768px ) {
136161 # modalContent {
137162 width : 90% ;
138163 margin : 10% auto;
139164 padding : 15px ;
140165 }
166+ }
141167 </ style >
142168</ head >
143169
144170< body >
145171
146172 < main >
147- < button id ="createWebhookBtn " onclick ="createWebhook() " class ="button "> Create Webhook</ button >
148- < button id ="deleteWebhookBtn " onclick ="deleteWebhook() " class ="button "> Delete Webhook</ button >
149- < button id ="getBotInfoBtn " onclick ="getBotInfo() " class ="button "> Get Token Info</ button >
173+ < button id ="createWebhookBtn " onclick ="createWebhook() " class ="button "> < i class =" fas fa-link " > </ i > Create Webhook</ button >
174+ < button id ="deleteWebhookBtn " onclick ="deleteWebhook() " class ="button "> < i class =" fas fa-trash-alt " > </ i > Delete Webhook</ button >
175+ < button id ="getBotInfoBtn " onclick ="getBotInfo() " class ="button "> < i class =" fas fa-info-circle " > </ i > Get Token Info</ button >
150176 < button id ="clearPendingRequestsBtn " onclick ="clearPendingRequests() " class ="button "> Clear Pending Requests</ button >
151177 </ main >
152178
153179 < footer id ="footer ">
154180 < p > Developed by < a href ="https://zoro2045.github.io/ "> ፚ Ꭷ Ꮢ Ꭷ ❥</ a > </ p >
155181 </ footer >
156-
182+
157183 < div id ="modal ">
158184 < div id ="modalContent ">
159- < span id ="closeModal "> × </ span >
185+ < span id ="closeModal "> × </ span >
160186 < h2 > Token Information</ h2 >
161187 < pre id ="tokenInfo "> </ pre >
162188 </ div >
@@ -208,11 +234,11 @@ <h2>Token Information</h2>
208234 if ( botData . ok ) {
209235 var canJoinGroups = botData . result . can_join_groups ? 'Supported 👥!' : 'Not Supported ❌!' ;
210236 var botInfo = `- Bot Information 🧾!\n------------------------------------\n` +
211- `- Bot Name : ${ botData . result . first_name } 🤖!\n` +
212- `- Bot Username : @${ botData . result . username } 🌀!\n` +
213- `- Bot ID : ${ botData . result . id } 🆔!\n` +
214- `- Add to Groups : ${ canJoinGroups } \n` +
215- `------------------------------------\n\n` ;
237+ `- Bot Name : ${ botData . result . first_name } 🤖!\n` +
238+ `- Bot Username : @${ botData . result . username } 🌀!\n` +
239+ `- Bot ID : ${ botData . result . id } 🆔!\n` +
240+ `- Add to Groups : ${ canJoinGroups } \n` +
241+ `------------------------------------\n\n` ;
216242
217243 getWebhookInfo ( token , botInfo ) ;
218244 } else {
@@ -236,11 +262,11 @@ <h2>Token Information</h2>
236262 var webhookData = JSON . parse ( webhookRequest . responseText ) ;
237263 if ( webhookData . ok ) {
238264 var webhookInfo = `- Webhook Information 🎫!\n------------------------------------\n` +
239- `- Webhook URL : ${ webhookData . result . url || 'Not Available 🖇!' } \n` +
240- `- IP Address for Webhook : ${ webhookData . result . ip_address || 'Not Available 🌐!' } \n` +
241- `- Custom Certificate : Not Available 🌐!\n` +
242- `- Number of Pending Requests : ${ webhookData . result . pending_update_count || 0 } 🔢!\n` +
243- `- Requests that the bot can receive : { All update types except {chat_member, message_reaction, message_reaction_count} (default) } ✔!\n` ;
265+ `- Webhook URL : ${ webhookData . result . url || 'Not Available 🖇!' } \n` +
266+ `- IP Address for Webhook : ${ webhookData . result . ip_address || 'Not Available 🌐!' } \n` +
267+ `- Custom Certificate : Not Available 🌐!\n` +
268+ `- Number of Pending Requests : ${ webhookData . result . pending_update_count || 0 } 🔢!\n` +
269+ `- Requests that the bot can receive : { All update types except {chat_member, message_reaction, message_reaction_count} (default) } ✔!\n` ;
244270
245271 document . getElementById ( 'tokenInfo' ) . textContent = botInfo + webhookInfo ;
246272 document . getElementById ( 'modal' ) . style . display = "block" ;
@@ -292,11 +318,11 @@ <h2>Token Information</h2>
292318 request . send ( ) ;
293319 }
294320
295- document . getElementById ( 'closeModal' ) . onclick = function ( ) {
321+ document . getElementById ( 'closeModal' ) . onclick = function ( ) {
296322 document . getElementById ( 'modal' ) . style . display = "none" ;
297323 }
298324
299- window . onclick = function ( event ) {
325+ window . onclick = function ( event ) {
300326 if ( event . target == document . getElementById ( 'modal' ) ) {
301327 document . getElementById ( 'modal' ) . style . display = "none" ;
302328 }
0 commit comments