forked from ucbg/ucbg.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.html
More file actions
443 lines (422 loc) · 17.7 KB
/
search.html
File metadata and controls
443 lines (422 loc) · 17.7 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
441
442
443
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<title>Search - Unblocked Cool Browser Games (UCBG)</title>
<meta name="description" content="Search - Cool play Unblocked Cool Browser Games (UCBG) easy at school" />
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#121217" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="HandheldFriendly" content="True" />
<meta http-equiv="cleartype" content="on" />
<link rel="preload" as="font" type="font/woff2" href="/assets/fonts/Inter-Regular.woff2?v=3.19" crossorigin="anonymous" />
<link rel="preload" as="font" type="font/woff2" href="/assets/fonts/Inter-SemiBold.woff2?v=3.19" crossorigin="anonymous" />
<link rel="preload" as="font" type="font/woff2" href="/assets/fonts/Inter-Medium.woff2?v=3.19" crossorigin="anonymous" />
<link rel="preload" as="font" type="font/woff2" href="/assets/fonts/Inter-Bold.woff2?v=3.19" crossorigin="anonymous" />
<link rel="preload" as="font" type="font/woff2" href="/assets/fonts/Inter-ExtraBold.woff2?v=3.19" crossorigin="anonymous" />
<link rel="preload" as="style" href="/assets/theme/css/theme.css?v=3.0.9" />
<link rel="preload" as="script" href="/assets/theme/js/jquery.min.js?v=1.0.0" />
<link media="all" rel="stylesheet" href="/assets/theme/css/theme.css?v=3.0.9" type="text/css" />
<link rel="shortcut icon" href="/assets/static/favicon.ico?v=1.0.0" />
<script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.8.3/dist/lazyload.min.js"></script>
<script src="/assets/js/load-games.js"></script>
<script src="/assets/js/recent_games.js"></script>
<script src="/assets/js/theme.js?v=3.6.0"></script>
<script type="text/javascript">
var Base = "/";
var Assets = "/assets";
var _Auth = false;
var __ = function (msgid) {
return window.i18n[msgid] || msgid;
};
window.i18n = {
more: "more",
less: "less",
"No comments yet": "No comments yet",
};
</script>
<script type="text/javascript">
document.addEventListener("keydown", function (event) {
if (event.keyCode === 38 || event.keyCode === 40) {
// up or down arrow key
event.preventDefault(); // prevent default scrolling behavior
}
});
</script>
<style type="text/css">
:root {
--theme-color: #300a8a;
--xp-color: #4d8ef7;
}
.social-button {
display: inline-block;
margin: 10px;
position: relative;
overflow: hidden;
}
.social-button img {
width: 20px;
height: 20px;
transition: transform 0.3s ease-in-out;
border: 1px black;
}
.social-button:hover img {
transform: scale(1.1);
}
.social-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
display: flex;
justify-content: center;
align-items: center;
}
.social-button:hover .social-overlay {
opacity: 1;
}
.social-icon {
color: white;
font-size: 14px;
}
</style>
</head>
<body class="min-vh-100 layout d-flex flex-column">
<button class="mobile-menu-btn" id="mobileMenuBtn">☰</button>
<div class="sidebar" id="sidebar">
<div class="sidebar-menu">
<a href="/category/action.html" class="sidebar-item">
<span class="sidebar-icon">🔥</span>
<span class="sidebar-text">Action Games</span>
</a>
<a href="/category/adventure.html" class="sidebar-item">
<span class="sidebar-icon">🗺️</span>
<span class="sidebar-text">Adventure Games</span>
</a>
<a href="/category/car.html" class="sidebar-item">
<span class="sidebar-icon">🚗</span>
<span class="sidebar-text">Car Games</span>
</a>
<a href="/category/clicker.html" class="sidebar-item">
<span class="sidebar-icon">🖱️</span>
<span class="sidebar-text">Clicker Games</span>
</a>
<a href="/category/io.html" class="sidebar-item">
<span class="sidebar-icon">🌐</span>
<span class="sidebar-text">.IO Games</span>
</a>
<a href="/category/parkour.html" class="sidebar-item">
<span class="sidebar-icon">🏃</span>
<span class="sidebar-text">Parkour Games</span>
</a>
<a href="/category/platform.html" class="sidebar-item">
<span class="sidebar-icon">🎮</span>
<span class="sidebar-text">Platform Games</span>
</a>
<a href="/category/running.html" class="sidebar-item">
<span class="sidebar-icon">🏃♂️</span>
<span class="sidebar-text">Running Games</span>
</a>
<a href="/category/shooting.html" class="sidebar-item">
<span class="sidebar-icon">🎯</span>
<span class="sidebar-text">Shooting Games</span>
</a>
<a href="/category/soccer.html" class="sidebar-item">
<span class="sidebar-icon">⚽</span>
<span class="sidebar-text">Soccer Games</span>
</a>
<a href="/category/stickman.html" class="sidebar-item">
<span class="sidebar-icon">🧍</span>
<span class="sidebar-text">Stickman Games</span>
</a>
<a href="/category/two-player.html" class="sidebar-item">
<span class="sidebar-icon">👥</span>
<span class="sidebar-text">Two Player Games</span>
</a>
<a href="/category/fighting.html" class="sidebar-item">
<span class="sidebar-icon">🥊</span>
<span class="sidebar-text">Fighting Games</span>
</a>
<a href="/category/kids.html" class="sidebar-item">
<span class="sidebar-icon">👶</span>
<span class="sidebar-text">Kids Games</span>
</a>
<a href="/category/multiplayer.html" class="sidebar-item">
<span class="sidebar-icon">👥</span>
<span class="sidebar-text">Multiplayer Games</span>
</a>
<a href="/category/puzzle.html" class="sidebar-item">
<span class="sidebar-icon">🧩</span>
<span class="sidebar-text">Puzzle Games</span>
</a>
<a href="/category/racing.html" class="sidebar-item">
<span class="sidebar-icon">🏎️</span>
<span class="sidebar-text">Racing Games</span>
</a>
<a href="/category/school.html" class="sidebar-item">
<span class="sidebar-icon">🏫</span>
<span class="sidebar-text">School Games</span>
</a>
<a href="/category/skill.html" class="sidebar-item">
<span class="sidebar-icon">🎯</span>
<span class="sidebar-text">Skill Games</span>
</a>
<a href="/category/bonus.html" class="sidebar-item">
<span class="sidebar-icon">💰</span>
<span class="sidebar-text">Start Rich, Play Hard</span>
</a>
<a href="/category/halloween.html" class="sidebar-item">
<span class="sidebar-icon">🎃</span>
<span class="sidebar-text">Halloween Games</span>
</a>
<a href="/category/snake.html" class="sidebar-item">
<span class="sidebar-icon">🐍</span>
<span class="sidebar-text">Snake Games</span>
</a>
<a href="/category/sport.html" class="sidebar-item">
<span class="sidebar-icon">🏀</span>
<span class="sidebar-text">Sport Games</span>
</a>
<a href="/category/strategy.html" class="sidebar-item">
<span class="sidebar-icon">⚔️</span>
<span class="sidebar-text">Strategy Games</span>
</a>
<a href="/category/trending.html" class="sidebar-item">
<span class="sidebar-icon">⭐</span>
<span class="sidebar-text">Trending Games</span>
</a>
<hr />
<a href="/category/tags.html" class="sidebar-item">
<span class="sidebar-icon">🗂️</span>
<span class="sidebar-text">Tags</span>
</a>
</div>
</div>
<nav class="navbar navbar-expand-lg layout-header navbar-light">
<div class="container-fluid">
<button
class="navbar-toggler border-0 shadow-none px-0"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbar"
aria-controls="navbar"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<a href="/index.html" class="navbar-brand dark-logo me-lg-4">
<img src="/assets/static/logo.png" height="30" alt="Unblocked Cool Browser Games (UCBG)" />
</a>
<a href="/index.html" class="navbar-brand light-logo me-lg-4">
<img src="/assets/static/dark_logo.png" height="30" alt="Unblocked Cool Browser Games (UCBG)" />
</a>
<button
class="navbar-toggler border-0 shadow-none px-0"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbar"
aria-controls="navbar"
aria-expanded="false"
aria-label="Toggle navigation"
>
<svg width="24" height="24" stroke="currentColor" stroke-width="1.75" fill="none">
<use xlink:href="/assets/sprite/sprite.svg#search"></use>
</svg>
</button>
<div class="collapse navbar-collapse" id="navbar">
<form class="form-search w-xxl-300 w-xl-250 ms-xl-4 mb-3 mb-lg-0" action="/search.html" method="get" autocomplete="off">
<div class="input-group input-group-inline shadow-none">
<span class="input-group-text bg-transparent border-0 text-gray-500 shadow-none ps-0 pe-3">
<svg width="18" height="18" stroke="currentColor" stroke-width="1.75" fill="none">
<use xlink:href="/assets/sprite/sprite.svg#search"></use>
</svg>
</span>
<input
type="text"
name="q"
class="form-control form-control-flush bg-transparent border-0 ps-0"
id="search"
placeholder="Text to search..."
aria-label="Search"
required="true"
minlength="3"
autocomplete="off"
/>
</div>
</form>
<ul class="navbar-nav mb-2 mb-lg-0 fw-semibold align-items-xl-center ms-xl-auto flex" style="display: flex; flex-direction: row">
<li class="nav-item">
<button class="theme-toggle" id="chat-button">
<span class=""><img src="/assets/icons/chat.svg" /></span>
<span class="tooltip">Chat</span>
</button>
</li>
<li>
<button class="theme-toggle" onclick="window.open('https://www.youtube.com/@unblocked-game', '_blank');">
<img src="/assets/icons/youtube.svg" alt="YouTube Icon" style="height: 38px" />
<span class="tooltip">Follow us to access the latest unblocked site.</span>
</button>
</li>
<li class="nav-item">
<button class="theme-toggle" style="width: 150px; border-radius: 10px">
<span class="sun-icon"><img src="/assets/icons/classroom-black.svg" /></span>
<span class="moon-icon"><img src="/assets/icons/classroom-white.svg" /></span>
<span id="online-users"> </span>
<span class="tooltip">Online Players: Pretending to learn, but actually leveling up.</span>
</button>
</li>
</ul>
</div>
</div>
</nav>
<div class="py-1"></div>
<div class="layout-section">
<div class="container-fluid" style="margin-top: 100px">
<div class="layout-heading mb-4">
<div>
<h1 class="h2">SEARCH GAMES</h1>
<div class="fs-sm text-muted"></div>
</div>
</div>
<div id="searchError" class="card-masonry mb-4" style="display: none">Not Found!</div>
<div id="games-container" class="card-masonry mb-4"></div>
</div>
<script src="assets/js/search-games.js"></script>
</div>
<script>
document.addEventListener("DOMContentLoaded", async function () {
const container = document.getElementById("games-container");
const searchError = document.getElementById("searchError");
// Arama sorgusunu al
const q = (window.location.href.split("?q=")?.[1] ?? "").replace(/ /g, "").replace(/\+/g, "").replace(/-/g, "").toLowerCase();
try {
// Oyunları JSON'dan çek
const response = await fetch("/data-json/games.json");
const games = await response.json();
let found = false;
let cnt = 0;
games.forEach((game) => {
const title = game.title.toLowerCase();
let match = true;
let pos = 0;
// Arama algoritması (senin kullandığın gibi)
for (let i = 0; i < q.length; i++) {
let newPos = title.indexOf(q[i], pos);
if (newPos < 0) {
match = false;
break;
} else {
pos = newPos + 1;
}
}
if (match && cnt < 50) {
cnt++;
found = true;
// Kartı oluştur (senin HTML yapına uygun)
const card = document.createElement("a");
card.href = game.url;
card.className = "card game-item visible";
card.style.display = "block";
card.innerHTML = `
<picture>
<source
data-srcset="${game.image}"
type="image/png"
class="img-fluid"
srcset="${game.image}"
/>
<img
data-src="${game.image}"
alt="${game.title}"
class="lazyload img-fluid"
width="500"
height="500"
/>
</picture>
<div class="card-body">
<h3>${game.title}</h3>
</div>
`;
container.appendChild(card);
}
});
if (!found) {
searchError.style.display = "block";
}
} catch (error) {
searchError.style.display = "block";
}
});
</script>
<script defer="" src="/assets/theme/js/jquery.min.js?v=1.0.0"></script>
<script defer="" src="/assets/theme/js/bootstrap.js?v=1.0.0"></script>
<script defer="" src="/assets/theme/js/lazysizes.js?v=1.0.0"></script>
<script defer="" src="/assets/theme/js/main.js?v=1.0.0"></script>
<script src="https://comment.silecekci.com/embed.js"></script>
<div class="footer py-2 mt-auto">
<div class="container-fluid">
<div class="row align-items-center no-gutters py-2 fs-14">
<!-- Desc -->
<div class="col-lg-4 col-md-5 col-12">
<div class="fs-xs text-muted">
Copyright © 2024 Unblocked Cool Browser Games (UCBG). All rights reserved.<br />
Play Beyond Limits / OurHero Games
</div>
</div>
<!-- Links -->
<div class="col-12 col-md-7 col-lg-8 d-md-flex justify-content-end">
<nav class="nav fs-xs text-muted">
<a class="nav-link text-current" href="/">Home</a>
<a class="nav-link text-current" rel="nofollow" href="/privacy-policy.html">Privacy Policy</a>
<a class="nav-link text-current" rel="nofollow" href="/terms-and-conditions.html">Terms and Conditions</a>
<a class="nav-link text-current" rel="nofollow" href="/contact.html">Contact</a>
<a class="nav-link text-current" href="/sitemaps.xml">Sitemaps</a>
</nav>
</div>
</div>
</div>
</div>
<div class="modal" id="xl" tabindex="-1" aria-labelledby="modal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl">
<div class="modal-content"></div>
</div>
</div>
<div class="modal" id="lg" tabindex="-1" aria-labelledby="modal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content"></div>
</div>
</div>
<div class="modal" id="m" tabindex="-1" aria-labelledby="modal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content"></div>
</div>
</div>
<div class="modal" id="sm" tabindex="-1" aria-labelledby="modal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm">
<div class="modal-content"></div>
</div>
</div>
<script src="/assets/js/analytics_ucbg_v1.js"></script>
<script src="/assets/js/adsense_ucbg_v1.js"></script>
<script src="/assets/js/fullscreen.js?v=2.0.2"></script>
<script src="/assets/js/video_on_card.js"></script>
<script src="/assets/js/ucbg_chat_v3.js?v=2.0.0"></script>
<script src="/assets/js/live-search.js"></script>
<script src="/assets/js/categories_menu.js?v=1.0.7"></script>
<script src="/assets/js/users.js"></script>
<!-- Firebase SDK -->
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-firestore.js"></script>
<!-- Firebase Comment System -->
<script src="/assets/js/firebase-comments.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function (event) {
document.getElementById("search").focus();
});
</script>
</body>
</html>