-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
440 lines (424 loc) · 13.4 KB
/
Copy pathindex.html
File metadata and controls
440 lines (424 loc) · 13.4 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
<!DOCTYPE html>
<html lang="en">
<head>
<title>PolyExtender - StreamLookup</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: 'Montserrat', sans-serif;
background-color: #171C28;
color: #e4e6eb;
margin: 0;
padding: 0;
}
a {
color: #15ebd2;
transition: color 0.3s ease;
}
a:hover {
color: #12d0b9;
text-decoration: none;
}
.backer {
background: linear-gradient(135deg, #15ebd2 0%, #12d0b9 100%);
}
.backer-dark {
background: #12d0b9;
}
nav {
box-shadow: none;
margin-bottom: 0;
}
.nav-wrapper ul li a {
font-weight: 500;
letter-spacing: 0.5px;
}
.page-header {
padding: 70px 0;
text-align: center;
background: linear-gradient(135deg, #15ebd2 0%, #0d9686 100%);
color: white;
margin-bottom: 40px;
}
.page-header h1 {
font-weight: 700;
margin: 0;
font-size: 2.9rem;
text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.page-header p {
font-weight: 400;
margin: 12px 0 0;
font-size: 1.25rem;
opacity: 0.92;
max-width: 650px;
margin-left: auto;
margin-right: auto;
}
.search-container {
background-color: #242C3D;
padding: 35px;
border-radius: 16px;
box-shadow: 0 12px 35px rgba(0,0,0,0.25);
margin: -55px auto 50px;
max-width: 720px;
position: relative;
z-index: 10;
}
.form-title {
font-size: 1.45rem;
font-weight: 600;
margin-bottom: 22px;
color: #fff;
}
.input-field input[type=text] {
border-bottom: 2px solid #15ebd2 !important;
box-shadow: none !important;
color: #fff;
font-size: 1.25rem;
}
.input-field input[type=text]:focus {
border-bottom: 2px solid #15ebd2 !important;
}
.input-field input[type=text] + label {
color: #97a0af;
}
.input-field input[type=text]:focus + label {
color: #15ebd2 !important;
}
.btn-search {
background-color: #15ebd2;
color: #171C28;
border-radius: 30px;
padding: 0 32px;
height: 52px;
line-height: 52px;
font-weight: 600;
letter-spacing: 0.6px;
text-transform: uppercase;
transition: all 0.3s ease;
box-shadow: 0 5px 15px rgba(21, 235, 210, 0.35);
}
.btn-search:hover, .btn-search:focus {
background-color: #12d0b9;
box-shadow: 0 8px 20px rgba(21, 235, 210, 0.45);
transform: translateY(-3px);
}
.results-container {
padding: 0 20px;
}
.results-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
padding-bottom: 18px;
border-bottom: 1px solid #324156;
}
.emote-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
gap: 24px;
margin-bottom: 40px;
}
.emote-card {
background-color: #242C3D;
border-radius: 12px;
overflow: hidden;
transition: all 0.3s ease;
height: 100%;
display: flex;
flex-direction: column;
}
.emote-card:hover {
transform: translateY(-8px);
box-shadow: 0 15px 30px rgba(21, 235, 210, 0.25);
}
.emote-img-container {
display: flex;
justify-content: center;
align-items: center;
padding: 24px;
background-color: #1B2233;
height: 135px;
}
.emote-img {
max-width: 100%;
max-height: 100%;
display: block;
object-fit: contain;
transition: transform 0.4s ease;
}
.emote-card:hover .emote-img {
transform: scale(1.1);
}
.emote-details {
padding: 16px;
flex: 1;
}
.emote-name {
font-weight: 600;
font-size: 1.12rem;
margin: 0 0 10px 0;
color: #fff;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Provider badges */
.provider-badge {
display: inline-flex;
align-items: center;
padding: 4px 10px;
border-radius: 20px;
font-size: 0.78rem;
font-weight: 500;
margin-top: 5px;
}
.provider-7tv {
background-color: rgba(100, 65, 164, 0.2);
color: #9373CC;
}
.provider-bttv {
background-color: rgba(88, 226, 193, 0.2);
color: #58E2C1;
}
.provider-ffz {
background-color: rgba(220, 157, 73, 0.2);
color: #DC9D49;
}
.provider-twitch {
background-color: rgba(145, 70, 255, 0.2);
color: #9146FF;
}
.provider-kick {
background-color: rgba(255, 51, 102, 0.2);
color: #ff3366;
}
.loader {
display: none;
text-align: center;
padding: 50px 0;
}
.no-results {
text-align: center;
padding: 70px 0;
color: #97a0af;
}
.no-results i {
font-size: 52px;
margin-bottom: 18px;
color: #324156;
}
footer {
background-color: #1B2233;
padding: 35px 0;
margin-top: 70px;
color: #97a0af;
}
.footer-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.footer-links a {
margin-left: 22px;
font-size: 0.9rem;
color: #97a0af;
transition: color 0.3s ease;
}
.footer-links a:hover {
color: #15ebd2;
}
@keyframes fadeInUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.animated {
animation: fadeInUp 0.5s ease forwards;
}
@media (max-width: 992px) {
.page-header { padding: 50px 0; }
.page-header h1 { font-size: 2.4rem; }
.search-container { margin: -40px 15px 40px; }
}
@media (max-width: 600px) {
.emote-grid {
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
gap: 18px;
}
.page-header h1 { font-size: 2rem; }
.page-header p { font-size: 1.05rem; }
.search-container { padding: 25px; }
}
</style>
</head>
<body>
<!-- Your original HTML structure remains unchanged -->
<header class="z-depth-1">
<nav class="z-depth-0 backer-dark">
<div class="nav-wrapper container">
<a href="#" class="brand-logo">PolyExtender</a>
<ul class="right hide-on-med-and-down">
<li><a href="https://polyextender.github.io/">Home</a></li>
<li><a href="https://polyextender.github.io/PolyStreamLookup/" class="active">StreamLookup</a></li>
</ul>
</div>
</nav>
</header>
<div class="page-header">
<div class="container">
<h1>Stream Emote Lookup</h1>
<p>Find all emotes from your favorite streamers across Twitch, 7TV, BTTV, FFZ</p>
</div>
</div>
<main class="container">
<div class="search-container z-depth-2">
<h3 class="form-title">Enter Channel Name</h3>
<form id="channelLookupForm">
<div class="row mb-0">
<div class="input-field col s12 m8">
<input type="text" id="inputField" name="user_input" required>
<label for="inputField">Channel Name (e.g., Whippy, XyroHero)</label>
</div>
<div class="input-field col s12 m4">
<button type="submit" class="btn-search btn waves-effect waves-light btn-large">
<i class="material-icons left">search</i> Find Emotes
</button>
</div>
</div>
</form>
</div>
<div class="loader">
<div class="preloader-wrapper big active">
<div class="spinner-layer spinner-teal-only">
<div class="circle-clipper left"><div class="circle"></div></div>
<div class="gap-patch"><div class="circle"></div></div>
<div class="circle-clipper right"><div class="circle"></div></div>
</div>
</div>
<p>Loading emotes...</p>
</div>
<div class="results-container" id="resultsSection" style="display: none;">
<div class="results-header">
<h2 id="channelTitle">Channel Emotes</h2>
<div class="results-stats" id="emoteCount"></div>
</div>
<div class="emote-grid" id="emoteContainer">
<!-- Emotes will be displayed here -->
</div>
</div>
<div class="no-results" id="noResults" style="display: none;">
<i class="material-icons">sentiment_dissatisfied</i>
<h3>No emotes found</h3>
<p>Try checking the spelling or try another channel name</p>
</div>
</main>
<footer>
<div class="container">
<div class="footer-content">
<div class="copyright">
© 2025 PolyExtender
</div>
<div class="footer-links">
<a href="https://github.com/polyextender" target="_blank">GitHub</a>
</div>
</div>
</div>
</footer>
<!-- Your original JavaScript - completely untouched -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Initialize Materialize components
M.AutoInit();
// Handle form submission
document.getElementById('channelLookupForm').addEventListener('submit', function(event) {
event.preventDefault();
const channel = document.getElementById('inputField').value.trim();
if (!channel) return;
// Show loading state
document.querySelector('.loader').style.display = 'block';
document.getElementById('resultsSection').style.display = 'none';
document.getElementById('noResults').style.display = 'none';
// Fetch emotes from API
const api_url = `https://emotes.crippled.dev/v1/channel/${channel}/all`;
fetch(api_url)
.then(response => response.json())
.then(data => {
// Hide loader
document.querySelector('.loader').style.display = 'none';
if (data.length === 0) {
// Show no results
document.getElementById('noResults').style.display = 'block';
return;
}
// Update UI with channel name and emote count
document.getElementById('channelTitle').textContent = `${channel}'s Emotes`;
document.getElementById('emoteCount').textContent = `${data.length} emotes found`;
// Show results section
document.getElementById('resultsSection').style.display = 'block';
// Clear previous results
const emoteContainer = document.getElementById('emoteContainer');
emoteContainer.innerHTML = '';
// Sort emotes by provider for better organization
data.sort((a, b) => a.provider - b.provider);
// Render emotes
data.forEach((emote, index) => {
// Create emote card
const card = document.createElement('div');
card.className = 'emote-card animated';
card.style.animationDelay = `${index * 0.05}s`;
// Get provider details
let providerName = ' Twitch';
let providerClass = 'provider-twitch';
let providerIcon = 'tv';
let providerUrl = `https://twitch.tv/${channel}`;
if (emote.provider === 1) {
providerName = ' 7TV';
providerClass = 'provider-7tv';
providerIcon = 'filter_7';
providerUrl = 'https://7tv.app/';
} else if (emote.provider === 2) {
providerName = ' BTTV';
providerClass = 'provider-bttv';
providerIcon = 'extension';
providerUrl = 'https://betterttv.com/';
} else if (emote.provider === 3) {
providerName = ' FFZ';
providerClass = 'provider-ffz';
providerIcon = 'face';
providerUrl = 'https://www.frankerfacez.com/';
}
// Create card HTML
card.innerHTML = `
<div class="emote-img-container">
<img src="${emote.urls[0].url}" alt="${emote.code}" class="emote-img">
</div>
<div class="emote-details">
<h3 class="emote-name" title="${emote.code}">${emote.code}</h3>
<div class="provider-badge ${providerClass}">
<i class="material-icons tiny">${providerIcon}</i> <a href="${providerUrl}">${providerName}</a>
</div>
</div>
`;
// Add the card to the container
emoteContainer.appendChild(card);
});
})
.catch(error => {
console.error('Error fetching data:', error);
document.querySelector('.loader').style.display = 'none';
document.getElementById('noResults').style.display = 'block';
});
});
// Focus input field on page load
document.getElementById('inputField').focus();
});
</script>
</body>
</html>