-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
513 lines (448 loc) · 17.9 KB
/
index.html
File metadata and controls
513 lines (448 loc) · 17.9 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
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Basket Bros | Also at www.crispyclean.org</title>
<meta name="description" content="Online multiplayer basketball! Dunk all over your bros!" />
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="shortcut icon" type="image/png" href="./favicon.png">
<meta name="Keywords" content="Basketball, Play, Free, Online, Multiplayer, Games, IO, Sports, Dunk, Scrolling, Friends">
<meta name="author" content="Blue Wizard Digital">
<meta property="og:url" content="https://www.basketbros.io" />
<meta property="og:type" content="website" />
<meta property="og:image:width" content="1000" />
<meta property="og:image:height" content="500" />
<meta property="og:image" content="https://basketbros.io/basketbros.jpg" />
<meta name="image" property="og:image" content="https://basketbros.io/basketbros.jpg">
<meta property="og:title" content="Basket Bros | by Blue Wizard Digital" />
<meta property="og:description" content="Dunk all over your bros!" />
<meta name="viewport" content="user-scalable=0">
<link rel="manifest" href="manifest.json">
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/brodeliver/bb@12/BasketBros.js?th=644"></script>
<script>
if (typeof navigator.serviceWorker !== 'undefined') {
navigator.serviceWorker.register('sw.js')
}
</script>
<script>
window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, { capture: false, passive: false });
if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) {
var meta = document.getElementById ("viewport");
meta.setAttribute ('content', 'width=device-width, initial-scale=' + (2 / window.devicePixelRatio) + ', user-scalable=no');
}
window.addEventListener('keydown', function(e) {
if( (e.keyCode == 32|| e.keyCode == 38 || e.keyCode == 40) && e.target == document.body) {
e.preventDefault();
}
});
</script>
<style>
html,body { margin: 0; padding: 0; height: 100%; background: #000000; color: orange; height: 100%; width: 100%; height: 100vh; width: 100vw; margin:0; padding:0;}
.body::-webkit-scrollbar { /* WebKit */
width: 0px;
}
#openfl-content { background: #000000; width: 100%; height: 100%; }
#spinner {
-webkit-transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
-o-transform-origin: 50% 50%;
transform-origin: 50% 50%;
width: 82px;
height: 81px;
-webkit-animation: spin1 2s infinite linear;
-moz-animation: spin1 2s infinite linear;
-o-animation: spin1 2s infinite linear;
-ms-animation: spin1 2s infinite linear;
animation: spin1 2s infinite linear;
}
#basketbros-io_160x600_2 {
max-width: 160px;
max-height: 600px;
}
/* style the elements with CSS */
#pleaserotate-graphic{
fill: #fff;
}
#pleaserotate-backdrop {
color: #fff;
background-color: #000;
}
/* Main content styling */
#more {
display: flex;
justify-content: space-between;
background-color: #1a1a1a;
padding: 40px;
border-top: 0px solid #444;
color: #fff;
font-family: 'Arial', sans-serif;
}
.info-box {
width: 48%;
background-color: #222;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}
h3 {
font-size: 24px;
color: #ffa500; /* Football-themed color */
margin-bottom: 15px;
}
p, b {
line-height: 1.6;
font-size: 16px;
}
p {
margin-bottom: 10px;
}
b {
color: #ffd700; /* Highlighted question color */
}
/* unvisited link */
a:link {
color: #ffd700;
}
/* visited link */
a:visited {
color: #ffd700;
}
/* mouse over link */
a:hover {
color: #ffd700;
}
/* selected link */
a:active {
color: #ffd700;
}
.notch-top-left {
width: 20px;
height: 20px;
background-color: var(--background-color, #1a1a1a);
position: absolute;
top: -10px;
left: -10px;
clip-path: polygon(100% 0, 0 100%, 100% 100%);
}
/* Footer styling */
footer {
background-color: #000;
padding: 20px 0;
text-align: center;
color: #ccc;
font-size: 14px;
border-top: 2px solid #444;
margin-top: 40px;
font-family: 'Arial', sans-serif;
border: 0;
}
</style>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-125804026-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-125804026-2', { cookie_flags: 'secure;samesite=none' });
gtag('config', 'G-GYMF5NRSDN', { cookie_flags: 'secure;samesite=none' });
</script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-NZC6KXH4');</script>
<!-- End Google Tag Manager -->
<!-- Firebase App (the core Firebase SDK) -->
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js"></script>
<!-- Firebase Authentication -->
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-auth.js"></script>
<!-- Firebase Firestore (Database) -->
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-firestore.js"></script>
<script>
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyDeQ1CV2ZfZg4SJlu9CEWfpHG3--xpt-oU",
authDomain: "basket-bros-43586.firebaseapp.com",
projectId: "basket-bros-43586",
storageBucket: "basket-bros-43586.appspot.com",
messagingSenderId: "179647849243",
appId: "1:179647849243:web:87b99f44ca23f8a11729be"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
const auth = firebase.auth();
const db = firebase.firestore();
var userData = "";
function triggerSignIn()
{
var provider = new firebase.auth.GoogleAuthProvider();
auth.signInWithPopup(provider);
}
// Save game data function
function saveGameData(gameData) {
console.log('saving gamedata:' + gameData);
var userId = auth.currentUser.uid;
userData = gameData;
db.collection('users').doc(userId).set({
gameData: gameData
}).then(function() {
console.log('Game data saved');
}).catch(function(error) {
console.error('Error saving game data:', error);
});
}
// Load game data function
function loadGameData() {
return userData;
}
function loadGameDataAsync() {
var userId = auth.currentUser.uid;
console.log("Auth: Loading Game Data Async User ID:" + userId);
db.collection('users').doc(userId).get().then(function(doc) {
console.log("Auth: Checking for game data");
if (doc.exists) {
console.log("Auth: Checking for game data");
userData = doc.data().gameData;
//Main.LoadGlobals();
console.log('Auth: Load Game data:', doc.data().gameData);
if (typeof Main != "undefined")
{
Main.LoadDataComplete();
}
// Use the game data in your game
} else {
console.log('Auth: No such document!');
}
}).catch(function(error) {
console.error('Error loading game data:', error);
});
}
// Firebase auth state observer
auth.onAuthStateChanged(function(user) {
if (user) {
loadGameDataAsync();
SendEvent('event', 'sign_in');
console.log('user signed in');
} else {
console.log('No user signed in');
SendEvent('event', 'sign_out');
}
});
function signOut()
{
auth.signOut().then(() => {
Main.SignOutComplete();
console.log('signed out');
});
}
function isUserLoggedIn() {
return auth.currentUser !== null;
}
</script>
</head>
<body style="overflow:hidden;">
<noscript>Enable JavaScript bro!</noscript>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NZC6KXH4"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<script>
//alert("Globals:"+localStorage.getItem("/:Globals").length);
/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
var url = window.location.href;
if(url.includes("www."))
{
url = url.replace("www.","");
var f = document.createElement('form');
f.action=url;
f.method='POST';
var i=document.createElement('input');
i.type='hidden';
i.name='FGlobals';
i.value=localStorage.getItem("/:Globals");
f.appendChild(i);
document.body.appendChild(f);
f.submit();
}
else
{
var aPost = "";
var aStorage = localStorage.getItem("/:Globals");
var aLen = 0;
if(aStorage != null && aStorage.length > 0)
{
aLen = aStorage.length;
}
if(aPost.length > aLen) localStorage.setItem("/:Globals", aPost);
if(aPost.length > 0 && aPost.length == aLen) localStorage.setItem("/:Globals", aPost);
}
/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
</script>
<div id="loading" style="position: absolute; z-index: 15; top: 60%; left: 50%; transform: translate(-50%, 0); background: black;">
<center><img src="https://cdn.jsdelivr.net/gh/brodeliver/bb@13/assets/loading4.png"><br/>
<img src="https://cdn.jsdelivr.net/gh/brodeliver/bb@12/assets/fbro.png">
<img src="https://cdn.jsdelivr.net/gh/brodeliver/bb@12/assets/bbbro.png">
<img src="https://cdn.jsdelivr.net/gh/brodeliver/bb@12/assets/sbro.png">
<img src="https://cdn.jsdelivr.net/gh/brodeliver/bb@12/assets/wbro.png">
<img src="https://cdn.jsdelivr.net/gh/brodeliver/bb@12/assets/kbro.png">
<img src="https://cdn.jsdelivr.net/gh/brodeliver/bb@12/assets/bbro.png">
</center>
</div>
<div id="game2" style="width: 100%; height: 100%; ">
<div id="basketbros-io_160x600" style="float:left; width: 170px; height: 600px; position: relative; top: 50%; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%);">
</div>
<div id="openfl-content" onblur="window.focus();"
style="width: calc(100% - 320px); float:left;"
>
<script type="text/javascript">
lime.embed ("BasketBros", "openfl-content", 0, 0, { parameters: {} });
</script>
</div>
<div id="preroll" style="width: 960px; height: 540px; display: none; position: absolute; top: 50%; left: 50%; z-index: 100; transform: translate(-50%, -50%);">
</div>
<div id="basketbros-io_160x600_2" style="float:right; width: 170px; height: 600px; justify-content: right; text-align: right; position: relative; top: 50%; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%);">
</div>
<div id="basketbros-io_320x100" style="width: 320px; height: 100px; visibility:hidden; display: none; position: absolute; top: 30px; left: 30px; z-index: 100;overflow: hidden;">
</div>
<div id="basketbros-io_300x250" style="width: 300px; height: 250px; visibility:hidden; display: none; position: absolute; top: 30px; left: 30px; z-index: 100;overflow: hidden;">
</div>
<div id="basketbros-io_300x250_2" style="width: 300px; height: 250px; visibility:hidden; display: none; position: absolute; top: 30px; left: 30px; z-index: 100; overflow: hidden;">
</div>
<div id="basketbros-io_player_300x600" style="visibility:hidden; width: 300px; height: 600px; display: none; position: absolute; top: 30px; left: 30px; z-index: 100; overflow: hidden;">
</div>
<div id="basketbros-io_300x600_m" style="visibility:hidden; width: 300px; height: 600px; display: none; position: absolute; top: 30px; left: 30px; z-index: 100; overflow: hidden;">
</div>
<div id="basketbros-io_728x90" style="visibility:hidden; width: 728px; height: 90px; display: none; position: absolute; top: 30px; left: 30px; z-index: 100; text-align: center; overflow: hidden;">
</div>
<div id="basketbros-io_728x90_m" style="visibility:hidden; width: 728px; height: 90px; display: none; position: absolute; top: 30px; left: 30px; z-index: 100; text-align: center; overflow: hidden;">
</div>
<div id="basketbros-io_970x250" style="visibility:hidden; width: 970px; height: 250px; display: none; position: absolute; top: 30px; left: 30px; z-index: 100; text-align: center; overflow: hidden;">
</div>
</div>
<br/>
<div tabindex="-1" id="more">
<div class="info-box">
<h3>About BasketBros</h3>
<p>Alt link: www.baller.monster. Fun, fast-paced 1 on 1 basketball game with lots of action. Pick from a variety of characters and let the play begin. Go for crazy dunks, hit the stepback 3, or maybe even punch out your opponent!</p>
<p>The controls are very simple: Use either the arrow keys or wasd to control your baller. Jump by pressing the up arrow, and jump again to shoot. Enter/Space will attack if you are on defense.</p>
<p>Be sure to allow notifications so you will know when fun new basketball characters are added to the game!</p>
</div>
<div class="info-box">
<h3>FAQ</h3>
<b>Why isn't the game loading?</b>
<p>You should check your internet connection and make sure our site isn't blocked. Also, disable all ad blockers.</p>
<b>How do I play?</b>
<p>Just hop in and go dunk on some fools!</p>
<b>Which browser should I use?</b>
<p>You should use chrome. It is the only browser guaranteed to work. BasketBros has also been tested to work on FireFox and Safari, but not guaranteed.</p>
<b>Are there more Bros games?</b>
<p>Yes! Our newest is <a href="https://footballbros.io">Football Bros</a>, but we have other bros games, including <a href="https://soccerbros.gg">Soccer Bros</a> and <a href="https://wrestlebros.io">Wrestle Bros</a>. Also be sure to check out <a href="https://freegames.io" target="_blank">Web games at FreeGames.io</a></p>
<b>I'm blocked, where else can i play?</b>
<p>Check here, these links work for both football and basket bros: <a href="https://sites.google.com/bluewizard.com/basket-bros-unblocked">Basket Bros Unblocked</a></p>
<b>Partners</b>
<script>
function getPartner() {
const referrer = document.referrer;
const partners = {
'crazygames': '<a href="https://crazygames.com" target="_blank">Crazy Games</a>',
'freegames.io': '<a href="https://freegames.io" target="_blank">Free IO Games</a>',
'poki': 'Check out our friends at <a href="https://poki.com" target="_blank">Poki</a>',
'silver': '<a href="https://silvergames.com" target="_blank">Silver Games</a>',
'default': '<a href="https://freegames.io" target="_blank">IO Games at Freegames.io</a>'
};
const key = Object.keys(partners).find(k => referrer.includes(k)) || (referrer ? 'default' : 'default');
return partners[key];
}
document.write("<p>" + getPartner() + "</p>");
</script>
</div> </div>
</div>
<footer tabindex="-1">
<div class="footer-links">
<a href="https://bluewizard.com">Copyright 2025 Blue Wizard Digital</a> |
<a tabindex="-1" href="https://bluewizard.com/terms/">Terms of Service</a> |
<a tabindex="-1" href="https://bluewizard.com/privacypolicy/">Privacy Policy</a>
</div>
</footer>
<script>
function right(str, chr)
{
return str.slice(str.length-chr,str.length);
}
document.getElementById("openfl-content").addEventListener("wheel", doScroll);
document.getElementById("more").addEventListener("wheel", doScroll);
function doScroll(event) {
window.scroll(0, window.scrollY + event.deltaY);
}
setInterval(function () {
//console.log("active element:" + document.activeElement);
if (document.activeElement.tagName == "IFRAME") {
document.activeElement.blur();
document.getElementById('openfl-content').focus();
console.log('refocusing');
}
}, 1000);
var sid='7effae24a26fa285c4cccda5660184e1'
function updateStatus(fromEvent = false)
{
const req = new XMLHttpRequest();
var aStr = "recordsession.php?s="+sid;
if(fromEvent == true) aStr = aStr + "&e=1"
req.open("GET", aStr);
req.send();
}
function SendEvent(theEvent, theAction, theParms = '') {
if(theParms == '') {
gtag(theEvent, theAction);
} else {
gtag(theEvent, theAction, theParms);
}
updateStatus(true);
//console.log("Sending event: " + theEvent + "/" + theAction + "/" + theParms);
}
//setInterval(function() { updateStatus, 4*60*1000);
updateStatus(true);
//setInterval(ClearAds, 2000);
function ShowAd1() { return; }
function ShowAd2() { return; }
function ShowAd3() { return; }
function ShowAd4() { return; }
function ShowAd5() { return; }
function ShowAd6() { return; }
function ShowAd7() { return; }
function ShowAd8() { return; }
function ShowAd9() { return; }
function ShowAd10() { return; }
function ShowAd11() { return; }
function ShowVideo(theUnitName=null)
{
Main.DoneVideoAd(true);
return;
}
function GamePlayStart() {
if(typeof window.CrazyGames !== 'undefined' && window.CrazyGames.SDK.environment != "disabled")
{
console.log("GamePlayStart");
window.CrazyGames.SDK.game.gameplayStart();
}
}
function GamePlayStop() {
if(typeof window.CrazyGames !== 'undefined' && window.CrazyGames.SDK.environment != "disabled")
{
console.log("GamePlayStop");
window.CrazyGames.SDK.game.gameplayStop();
}
}
function HappyTime() {
if(typeof window.CrazyGames !== 'undefined' && window.CrazyGames.SDK.environment != "disabled")
{
console.log("happytime");
window.CrazyGames.SDK.game.happytime();
}
}
</script>
<!--<img id="update"style="position: fixed; right: 0px; bottom: 0px; width: 25vw;" src="update.jpg"><br/>-->
</body>
</html>