api-ix commited on
Commit
1ae17e8
·
verified ·
1 Parent(s): 406bfc6

Upload 3 files

Browse files
Files changed (3) hide show
  1. index.html +1 -1
  2. script.js +271 -62
  3. styles.css +25 -14
index.html CHANGED
@@ -50,7 +50,7 @@
50
  </div>
51
  <div class="stat-card">
52
  <i class="fas fa-server"></i>
53
- <span>51</span>
54
  <small>endpoints</small>
55
  </div>
56
  <div class="stat-card">
 
50
  </div>
51
  <div class="stat-card">
52
  <i class="fas fa-server"></i>
53
+ <span>50</span>
54
  <small>endpoints</small>
55
  </div>
56
  <div class="stat-card">
script.js CHANGED
@@ -1,34 +1,229 @@
1
  /* ====== DATA ====== */
2
  const endpoints = [
3
- { name: "Anime Downloader", path: "/api/animedl?name=solo%20leveling&episode=1", method: "GET", params: ["name","episode"], desc: "Download any anime series with ease", cat: "Downloaders"},
4
- { name: "All-in-one", path: "/api/all-in-one?url=https://fb.com/video", method: "GET", params: ["url"], desc: "Download any social-media video", cat: "Downloaders"},
5
- { name: "Anime Quote", path: "/api/aniquote", method: "GET", params: [], desc: "Random quote from popular anime", cat: "Fun"},
6
- { name: "APK Downloader", path: "/api/apkdl?q=Facebook%20lite", method: "GET", params: ["q"], desc: "Download APKs directly", cat: "Downloaders"},
7
- { name: "Calculator", path: "/api/cal?num1=10&num2=5&operation=add", method: "GET", params: ["num1","num2","operation"], desc: "Basic arithmetic", cat: "Tools"},
8
- { name: "Country Info", path: "/api/country?q=Nigeria", method: "GET", params: ["q"], desc: "Country profiles", cat: "Tools"},
9
- { name: "Currency Converter", path: "/api/convert?from=USD&to=EUR&amount=100", method: "GET", params: ["from","to","amount"], desc: "Live exchange rates", cat: "Tools"},
10
- { name: "Dare", path: "/api/dare", method: "GET", params: [], desc: "Random dare challenge", cat: "Fun"},
11
- { name: "Encode", path: "/api/encode?text=Hello-world", method: "GET", params: ["text"], desc: "Text → binary", cat: "Tools"},
12
- { name: "Decode", path: "/api/decode?binary=01001000", method: "GET", params: ["binary"], desc: "Binary → text", cat: "Tools"},
13
- { name: "Facebook DL", path: "/api/fbdl?url=URL", method: "GET", params: ["url"], desc: "Facebook video downloader", cat: "Downloaders"},
14
- { name: "Gpt3.5", path: "/api/gpt3.5?prompt=hi", method: "GET", params: ["prompt"], desc: "ChatGPT-3.5 turbo", cat: "AI"},
15
- { name: "TikTok DL", path: "/api/tkdl?url=URL", method: "GET", params: ["url"], desc: "No-watermark TikTok", cat: "Downloaders"},
16
- { name: "Instagram DL", path: "/api/instadl?url=URL", method: "GET", params: ["url"], desc: "Instagram media downloader", cat: "Downloaders"},
17
- { name: "YouTube MP4", path: "/api/ytmp4?url=URL", method: "GET", params: ["url"], desc: "YouTube video", cat: "Downloaders"},
18
- { name: "YouTube MP3", path: "/api/ytmp3?url=URL", method: "GET", params: ["url"], desc: "YouTube audio", cat: "Downloaders"},
19
- { name: "Text-to-Image", path: "/api/text2img?prompt=hello", method: "GET", params: ["prompt"], desc: "AI image generation", cat: "AI"},
20
- { name: "Translator", path: "/api/translate?text=hello&from=en&to=id", method: "GET", params: ["text","from","to"], desc: "Auto-detect translate", cat: "Tools"},
21
- { name: "Joke", path: "/api/joke", method: "GET", params: [], desc: "Random joke", cat: "Fun"},
22
- { name: "Quote", path: "/api/quote", method: "GET", params: [], desc: "Inspirational quote", cat: "Fun"},
23
- { name: "Screenshot", path: "/api/screenshot?url=WEBSITE", method: "GET", params: ["url"], desc: "Website screenshot", cat: "Tools"},
24
- { name: "TinyURL", path: "/api/tinyurl?url=LONG", method: "GET", params: ["url"], desc: "URL shortener", cat: "Tools"},
25
- { name: "Spotify DL", path: "/api/spotifydl?url=TRACK_URL", method: "GET", params: ["url"], desc: "Spotify downloader", cat: "Downloaders"},
26
- { name: "Twitter DL", path: "/api/twitterdl?url=TWEET_URL", method: "GET", params: ["url"], desc: "Twitter video downloader", cat: "Downloaders"},
27
- { name: "Pinterest Search", path: "/api/pinterest?q=cats", method: "GET", params: ["q"], desc: "Pinterest images", cat: "Search"},
28
- { name: "Wallpaper", path: "/api/wallpaper?q=nature", method: "GET", params: ["q"], desc: "HD wallpapers", cat: "Random"},
29
- { name: "Waifu (NSFW)", path: "/api/waifu?q=", method: "GET", params: ["q"], desc: "Random waifu pics", cat: "Random"},
30
- { name: "Hentai (NSFW)", path: "/api/hentai", method: "GET", params: [], desc: "Hentai videos", cat: "Random"},
31
- { name: "XXX Search", path: "/api/xxxsearch?q=keyword", method: "GET", params: ["q"], desc: "Search adult videos", cat: "Search"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  ];
33
 
34
  const baseURL = window.location.origin;
@@ -39,13 +234,13 @@ let page = 0;
39
  const perPage = 12;
40
 
41
  /* ====== DOM ====== */
42
- const grid = document.getElementById('grid');
43
- const search = document.getElementById('search');
44
- const pills = document.getElementById('pills');
45
- const loadBtn = document.getElementById('loadMore');
46
- const modal = document.getElementById('modal');
47
- const mTitle = document.getElementById('mTitle');
48
- const mBody = document.getElementById('mBody');
49
 
50
  /* ====== INIT ====== */
51
  function init() {
@@ -57,18 +252,23 @@ function init() {
57
 
58
  /* ====== CATEGORIES ====== */
59
  function createPills() {
60
- const cats = ['All', ...new Set(endpoints.map(e => e.cat))];
61
- pills.innerHTML = cats.map(c => `<button class="pill" data-cat="${c}">${c}</button>`).join('');
62
- pills.firstElementChild.classList.add('active');
 
 
63
  }
64
 
65
  /* ====== RENDER ====== */
66
  function render(reset = true) {
67
- if (reset) { grid.innerHTML = ''; page = 0; }
 
 
 
68
  const slice = filtered.slice(0, (page + 1) * perPage);
69
- slice.forEach(e => {
70
- const card = document.createElement('div');
71
- card.className = 'card';
72
  card.innerHTML = `
73
  <span class="cat">${e.cat}</span>
74
  <h4>${e.name}</h4>
@@ -78,29 +278,34 @@ function render(reset = true) {
78
  card.onclick = () => openModal(e);
79
  grid.appendChild(card);
80
  });
81
- loadBtn.style.display = slice.length < filtered.length ? 'block' : 'none';
82
  }
83
 
84
  /* ====== SEARCH / FILTER ====== */
85
  function bindEvents() {
86
- search.addEventListener('input', filter);
87
- pills.addEventListener('click', e => {
88
- if (!e.target.classList.contains('pill')) return;
89
- pills.querySelector('.active')?.classList.remove('active');
90
- e.target.classList.add('active');
91
  filter();
92
  });
93
- loadBtn.addEventListener('click', () => { page++; render(false); });
94
- modal.querySelector('.modal-close').onclick = closeModal;
95
- modal.querySelector('.modal-backdrop').onclick = closeModal;
 
 
 
96
  }
97
 
98
  function filter() {
99
  const term = search.value.toLowerCase();
100
- const cat = pills.querySelector('.active').dataset.cat;
101
- filtered = endpoints.filter(e =>
102
- (cat === 'All' || e.cat === cat) &&
103
- (e.name.toLowerCase().includes(term) || e.desc.toLowerCase().includes(term))
 
 
104
  );
105
  render();
106
  }
@@ -112,29 +317,33 @@ function openModal(e) {
112
  mBody.innerHTML = `
113
  <p>${e.desc}</p>
114
  <p><strong>Method:</strong> ${e.method}</p>
115
- ${e.params.length ? `<p><strong>Params:</strong> ${e.params.join(', ')}</p>` : ''}
116
  <div class="code-snippet">curl -X ${e.method} "${url}"</div>
117
  <div style="margin-top:1rem">
118
  <button class="btn-copy" onclick="navigator.clipboard.writeText('${url}')">Copy URL</button>
119
  <a href="${url}" target="_blank" style="margin-left:.5rem" class="btn-copy">Test</a>
120
  </div>
121
  `;
122
- modal.classList.add('active');
 
 
 
123
  }
124
- function closeModal() { modal.classList.remove('active'); }
125
 
126
  /* ====== LIVE REQUEST COUNT ====== */
127
  async function fetchCount() {
128
  try {
129
  const res = await fetch(`${baseURL}/api/requests`);
130
  const data = await res.json();
131
- document.getElementById('req-count').textContent = data.request_count.toLocaleString();
 
132
  } catch {
133
- document.getElementById('req-count').textContent = '0';
134
  }
135
  }
136
 
137
  /* ====== UTILS ====== */
138
- window.scrollToSection = id => document.getElementById(id).scrollIntoView({ behavior: 'smooth' });
 
139
 
140
  init();
 
1
  /* ====== DATA ====== */
2
  const endpoints = [
3
+ {
4
+ name: "All-in-one",
5
+ path: "/api/all-in-one?url=https://fb.com/video",
6
+ method: "GET",
7
+ params: ["url"],
8
+ desc: "Download any social-media video",
9
+ cat: "Downloaders",
10
+ },
11
+ {
12
+ name: "Anime Quote",
13
+ path: "/api/aniquote",
14
+ method: "GET",
15
+ params: [],
16
+ desc: "Random quote from popular anime",
17
+ cat: "Fun",
18
+ },
19
+ {
20
+ name: "APK Downloader",
21
+ path: "/api/apkdl?q=Facebook%20lite",
22
+ method: "GET",
23
+ params: ["q"],
24
+ desc: "Download APKs directly",
25
+ cat: "Downloaders",
26
+ },
27
+ {
28
+ name: "Calculator",
29
+ path: "/api/cal?num1=10&num2=5&operation=add",
30
+ method: "GET",
31
+ params: ["num1", "num2", "operation"],
32
+ desc: "Basic arithmetic",
33
+ cat: "Tools",
34
+ },
35
+ {
36
+ name: "Country Info",
37
+ path: "/api/country?q=Nigeria",
38
+ method: "GET",
39
+ params: ["q"],
40
+ desc: "Country profiles",
41
+ cat: "Tools",
42
+ },
43
+ {
44
+ name: "Currency Converter",
45
+ path: "/api/convert?from=USD&to=EUR&amount=100",
46
+ method: "GET",
47
+ params: ["from", "to", "amount"],
48
+ desc: "Live exchange rates",
49
+ cat: "Tools",
50
+ },
51
+ {
52
+ name: "Dare",
53
+ path: "/api/dare",
54
+ method: "GET",
55
+ params: [],
56
+ desc: "Random dare challenge",
57
+ cat: "Fun",
58
+ },
59
+ {
60
+ name: "Encode",
61
+ path: "/api/encode?text=Hello-world",
62
+ method: "GET",
63
+ params: ["text"],
64
+ desc: "Text → binary",
65
+ cat: "Tools",
66
+ },
67
+ {
68
+ name: "Decode",
69
+ path: "/api/decode?binary=01001000",
70
+ method: "GET",
71
+ params: ["binary"],
72
+ desc: "Binary → text",
73
+ cat: "Tools",
74
+ },
75
+ {
76
+ name: "Facebook DL",
77
+ path: "/api/fbdl?url=https://www.facebook.com/share/r/1JB12MKi1Z/",
78
+ method: "GET",
79
+ params: ["url"],
80
+ desc: "Facebook video downloader",
81
+ cat: "Downloaders",
82
+ },
83
+ {
84
+ name: "Gpt3.5",
85
+ path: "/api/gpt3.5?prompt=hi",
86
+ method: "GET",
87
+ params: ["prompt"],
88
+ desc: "ChatGPT-3.5 turbo",
89
+ cat: "AI",
90
+ },
91
+ {
92
+ name: "TikTok DL",
93
+ path: "/api/tkdl?url=https://vt.tiktok.com/ZSAG1bG1e/",
94
+ method: "GET",
95
+ params: ["url"],
96
+ desc: "No-watermark TikTok",
97
+ cat: "Downloaders",
98
+ },
99
+ {
100
+ name: "Instagram DL",
101
+ path: "/api/instadl?url=https://www.instagram.com/reel/DNsaHN70Cdr/?igsh=YzljYTk1ODg3Zg==",
102
+ method: "GET",
103
+ params: ["url"],
104
+ desc: "Instagram media downloader",
105
+ cat: "Downloaders",
106
+ },
107
+ {
108
+ name: "YouTube MP4",
109
+ path: "/api/ytmp4?url=URL",
110
+ method: "GET",
111
+ params: ["url"],
112
+ desc: "YouTube video",
113
+ cat: "Downloaders",
114
+ },
115
+ {
116
+ name: "YouTube MP3",
117
+ path: "/api/ytmp3?url=URL",
118
+ method: "GET",
119
+ params: ["url"],
120
+ desc: "YouTube audio",
121
+ cat: "Downloaders",
122
+ },
123
+ {
124
+ name: "Text-to-Image",
125
+ path: "/api/text2img?prompt=hello",
126
+ method: "GET",
127
+ params: ["prompt"],
128
+ desc: "AI image generation",
129
+ cat: "AI",
130
+ },
131
+ {
132
+ name: "Translator",
133
+ path: "/api/translate?text=hello&from=en&to=id",
134
+ method: "GET",
135
+ params: ["text", "from", "to"],
136
+ desc: "Auto-detect translate",
137
+ cat: "Tools",
138
+ },
139
+ {
140
+ name: "Joke",
141
+ path: "/api/joke",
142
+ method: "GET",
143
+ params: [],
144
+ desc: "Random joke",
145
+ cat: "Fun",
146
+ },
147
+ {
148
+ name: "Quote",
149
+ path: "/api/quote",
150
+ method: "GET",
151
+ params: [],
152
+ desc: "Inspirational quote",
153
+ cat: "Fun",
154
+ },
155
+ {
156
+ name: "Screenshot",
157
+ path: "/api/screenshot?url=WEBSITE",
158
+ method: "GET",
159
+ params: ["url"],
160
+ desc: "Website screenshot",
161
+ cat: "Tools",
162
+ },
163
+ {
164
+ name: "TinyURL",
165
+ path: "/api/tinyurl?url=LONG",
166
+ method: "GET",
167
+ params: ["url"],
168
+ desc: "URL shortener",
169
+ cat: "Tools",
170
+ },
171
+ {
172
+ name: "Spotify DL",
173
+ path: "/api/spotifydl?url=TRACK_URL",
174
+ method: "GET",
175
+ params: ["url"],
176
+ desc: "Spotify downloader",
177
+ cat: "Downloaders",
178
+ },
179
+ {
180
+ name: "Twitter DL",
181
+ path: "/api/twitterdl?url=https://x.com/Korsogyimi/status/1962912658618802257",
182
+ method: "GET",
183
+ params: ["url"],
184
+ desc: "Twitter video downloader",
185
+ cat: "Downloaders",
186
+ },
187
+ {
188
+ name: "Pinterest Search",
189
+ path: "/api/pinterest?q=cats",
190
+ method: "GET",
191
+ params: ["q"],
192
+ desc: "Pinterest images",
193
+ cat: "Search",
194
+ },
195
+ {
196
+ name: "Wallpaper",
197
+ path: "/api/wallpaper?q=nature",
198
+ method: "GET",
199
+ params: ["q"],
200
+ desc: "HD wallpapers",
201
+ cat: "Random",
202
+ },
203
+ {
204
+ name: "Waifu (NSFW)",
205
+ path: "/api/waifu?q=",
206
+ method: "GET",
207
+ params: ["q"],
208
+ desc: "Random waifu pics",
209
+ cat: "Random",
210
+ },
211
+ {
212
+ name: "Hentai (NSFW)",
213
+ path: "/api/hentai",
214
+ method: "GET",
215
+ params: [],
216
+ desc: "Hentai videos",
217
+ cat: "Random",
218
+ },
219
+ {
220
+ name: "XXX Search",
221
+ path: "/api/xxxsearch?q=keyword",
222
+ method: "GET",
223
+ params: ["q"],
224
+ desc: "Search adult videos",
225
+ cat: "Search",
226
+ },
227
  ];
228
 
229
  const baseURL = window.location.origin;
 
234
  const perPage = 12;
235
 
236
  /* ====== DOM ====== */
237
+ const grid = document.getElementById("grid");
238
+ const search = document.getElementById("search");
239
+ const pills = document.getElementById("pills");
240
+ const loadBtn = document.getElementById("loadMore");
241
+ const modal = document.getElementById("modal");
242
+ const mTitle = document.getElementById("mTitle");
243
+ const mBody = document.getElementById("mBody");
244
 
245
  /* ====== INIT ====== */
246
  function init() {
 
252
 
253
  /* ====== CATEGORIES ====== */
254
  function createPills() {
255
+ const cats = ["All", ...new Set(endpoints.map((e) => e.cat))];
256
+ pills.innerHTML = cats
257
+ .map((c) => `<button class="pill" data-cat="${c}">${c}</button>`)
258
+ .join("");
259
+ pills.firstElementChild.classList.add("active");
260
  }
261
 
262
  /* ====== RENDER ====== */
263
  function render(reset = true) {
264
+ if (reset) {
265
+ grid.innerHTML = "";
266
+ page = 0;
267
+ }
268
  const slice = filtered.slice(0, (page + 1) * perPage);
269
+ slice.forEach((e) => {
270
+ const card = document.createElement("div");
271
+ card.className = "card";
272
  card.innerHTML = `
273
  <span class="cat">${e.cat}</span>
274
  <h4>${e.name}</h4>
 
278
  card.onclick = () => openModal(e);
279
  grid.appendChild(card);
280
  });
281
+ loadBtn.style.display = slice.length < filtered.length ? "block" : "none";
282
  }
283
 
284
  /* ====== SEARCH / FILTER ====== */
285
  function bindEvents() {
286
+ search.addEventListener("input", filter);
287
+ pills.addEventListener("click", (e) => {
288
+ if (!e.target.classList.contains("pill")) return;
289
+ pills.querySelector(".active")?.classList.remove("active");
290
+ e.target.classList.add("active");
291
  filter();
292
  });
293
+ loadBtn.addEventListener("click", () => {
294
+ page++;
295
+ render(false);
296
+ });
297
+ modal.querySelector(".modal-close").onclick = closeModal;
298
+ modal.querySelector(".modal-backdrop").onclick = closeModal;
299
  }
300
 
301
  function filter() {
302
  const term = search.value.toLowerCase();
303
+ const cat = pills.querySelector(".active").dataset.cat;
304
+ filtered = endpoints.filter(
305
+ (e) =>
306
+ (cat === "All" || e.cat === cat) &&
307
+ (e.name.toLowerCase().includes(term) ||
308
+ e.desc.toLowerCase().includes(term)),
309
  );
310
  render();
311
  }
 
317
  mBody.innerHTML = `
318
  <p>${e.desc}</p>
319
  <p><strong>Method:</strong> ${e.method}</p>
320
+ ${e.params.length ? `<p><strong>Params:</strong> ${e.params.join(", ")}</p>` : ""}
321
  <div class="code-snippet">curl -X ${e.method} "${url}"</div>
322
  <div style="margin-top:1rem">
323
  <button class="btn-copy" onclick="navigator.clipboard.writeText('${url}')">Copy URL</button>
324
  <a href="${url}" target="_blank" style="margin-left:.5rem" class="btn-copy">Test</a>
325
  </div>
326
  `;
327
+ modal.classList.add("active");
328
+ }
329
+ function closeModal() {
330
+ modal.classList.remove("active");
331
  }
 
332
 
333
  /* ====== LIVE REQUEST COUNT ====== */
334
  async function fetchCount() {
335
  try {
336
  const res = await fetch(`${baseURL}/api/requests`);
337
  const data = await res.json();
338
+ document.getElementById("req-count").textContent =
339
+ data.request_count.toLocaleString();
340
  } catch {
341
+ document.getElementById("req-count").textContent = "0";
342
  }
343
  }
344
 
345
  /* ====== UTILS ====== */
346
+ window.scrollToSection = (id) =>
347
+ document.getElementById(id).scrollIntoView({ behavior: "smooth" });
348
 
349
  init();
styles.css CHANGED
@@ -1,18 +1,4 @@
1
  /* ====== CSS VARIABLES ====== */
2
- .btn-copy {
3
- background: var(--accent);
4
- color: #fff;
5
- border: none;
6
- padding: .5rem 1rem;
7
- border-radius: 50px;
8
- font-size: .85rem;
9
- cursor: pointer;
10
- transition: opacity .2s;
11
- text-decoration: none;
12
- display: inline-block;
13
- }
14
- .btn-copy:hover { opacity: .85; }
15
-
16
  :root {
17
  --bg: #0a0a0f;
18
  --surface: rgba(255, 255, 255, 0.05);
@@ -36,6 +22,21 @@ body {
36
  overflow-x: hidden;
37
  }
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  /* ====== LIQUID BACKGROUND ====== */
40
  .liquid-bg {
41
  position: fixed;
@@ -60,6 +61,16 @@ body {
60
  100% { transform: translate(0,0) scale(1); }
61
  }
62
 
 
 
 
 
 
 
 
 
 
 
63
  /* ====== HEADER ====== */
64
  .header {
65
  position: sticky;
 
1
  /* ====== CSS VARIABLES ====== */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  :root {
3
  --bg: #0a0a0f;
4
  --surface: rgba(255, 255, 255, 0.05);
 
22
  overflow-x: hidden;
23
  }
24
 
25
+ /* ====== DIV BUTTON ====== */
26
+ .btn-copy {
27
+ background: var(--accent);
28
+ color: #fff;
29
+ border: none;
30
+ padding: .5rem 1rem;
31
+ border-radius: 50px;
32
+ font-size: .85rem;
33
+ cursor: pointer;
34
+ transition: opacity .2s;
35
+ text-decoration: none;
36
+ display: inline-block;
37
+ }
38
+ .btn-copy:hover { opacity: .85; }
39
+
40
  /* ====== LIQUID BACKGROUND ====== */
41
  .liquid-bg {
42
  position: fixed;
 
61
  100% { transform: translate(0,0) scale(1); }
62
  }
63
 
64
+ /* ====== TAP / HOVER MAGIC ====== */
65
+ .stat-card {
66
+ transition: transform 0.25s ease, box-shadow 0.25s ease;
67
+ }
68
+ .stat-card:hover,
69
+ .stat-card:active {
70
+ transform: translateY(-6px);
71
+ box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
72
+ }
73
+
74
  /* ====== HEADER ====== */
75
  .header {
76
  position: sticky;