-
Notifications
You must be signed in to change notification settings - Fork 0
/
streamers.html
467 lines (414 loc) · 22.5 KB
/
streamers.html
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
<!-- Modifications copyright (C) 2019 Kamil Szurant -->
<!DOCTYPE html>
<html lang = "en">
<head>
<title>Beat Aim - Rhythm Shooter</title>
<meta charset="UTF-8">
<meta name="description"
content="Beat Aim - rhythm game designed for FPS players with ai generated maps. Makes improving your aim incredibly fun while listening to your favorite songs.">
<meta name="keywords" content="beat aim, beat,aim,beataim,shooter,trainer,practice,rhythm,3d,ai,kamyker">
<meta name="author" content="Kamil Szurant">
<meta property="og:title" content="Beat Aim">
<meta property="og:type" content="website">
<meta property="og:image" content="https://beataim.com/meta-image.jpg">
<meta property="og:url" content="https://beataim.com">
<meta property="og:description"
content="Rhythm game designed for FPS players with ai generated maps. Makes improving your aim incredibly fun while listening to your favorite songs.">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@beat_aim">
<meta name="twitter:creator" content="@kamyker">
<meta name="twitter:title" content="Beat Aim">
<meta name="twitter:description"
content="Rhythm game designed for FPS players with ai generated maps. Makes improving your aim incredibly fun while listening to your favorite songs.">
<meta name="twitter:image" content="https://beataim.com/meta-image.jpg">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<!-- DEVELOPMENT FILES
<link rel="stylesheet" type="text/css" href="../dist/css/meshki.min.css">
<link rel="stylesheet" type="text/css" href="../dist/plugins/meshki-extra-button-colors.min.css">
<script type="text/javascript" src="../dist/js/meshki.min.js"></script>
DEVELOPMENT FILES -->
<!-- PRODUCTION FILES -->
<link rel="stylesheet" type="text/css" href="/cdn/meshki.min.css">
<link rel="stylesheet" type="text/css" href="/cdn/meshki-extra-button-colors.min.css">
<script type="text/javascript" src="/cdn/meshki.min.js"></script>
<!-- PRODUCTION FILES -->
<link rel="stylesheet" type="text/css" href="/custom.css">
<link rel="stylesheet" type="text/css" href="/cdn/font-awesome.min.css">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="/cdn/prism.min.css">
<link rel="stylesheet" href="/cdn/prism-okaidia.min.css">
<link href="https://fonts.googleapis.com/css?family=Muli&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Cinzel&display=swap" rel="stylesheet">
<link href="https://emoji-css.afeld.me/emoji.css" rel="stylesheet">
<script type="text/javascript" src="/PlayFabClientApi.js"></script>
<script type="text/javascript" src="/PlayFabCustom.js"></script>
<script type="text/javascript" src="/AzAzAz.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/json2html/1.3.0/json2html.min.js"></script>
<script src="https://d3js.org/d3-dsv.v1.min.js"></script>
</head>
<body class="">
<div class="sidenav push">
<a href="javascript:void(0);" class="sidenav-close-button" onclick="meshki.closeSidenav()">×</a>
<a href="index.html">Home</a>
<div class="hide-on-mobile">
<a href="https://discord.gg/2kW27Ez">Discord</a>
<a href="https://twitter.com/beat_aim">Twitter</a>
<a href="https://www.facebook.com/BeatAim/">Facebook</a>
</div>
<!-- <hr class="hide-on-non-mobile"> -->
<div class="hide-on-non-mobile">
<a href="https://store.steampowered.com/newshub/app/1142220" target="_blank"
onclick="meshki.closeSidenav()">News</a>
<a href="/roadmap" onclick="meshki.closeSidenav()">Roadmap</a>
<a href="/esports" onclick="meshki.closeSidenav()">Esports League</a>
<a href="/streamers" onclick="meshki.closeSidenav()">Streamers League</a>
<a href="/top-new-maps" onclick="meshki.closeSidenav()">Mapping League</a>
<a href="/partners" onclick="meshki.closeSidenav()">Partners</a>
<!-- <a href="/referral">Referrals</a> -->
</div>
<hr>
<!-- <button onclick="location.href='https://twitter.com/Meshki_UI'" class="button blue medium"><b></b><i class="fa fa-twitter" aria-hidden="true"></i></button>
<button onclick="location.href='https://www.npmjs.com/package/meshki'" class="button red medium"><b>npm</b></button>
<button onclick="location.href='https://github.com/Borderliner/Meshki'" class="button medium"><b></b><i class="fa fa-github" aria-hidden="true"></i></button> -->
<a href="javascript:void(0)" disabled style="font-size: 1.5rem">Share on:</a>
<div class="share-links">
<a class="fb-share" href="https://www.facebook.com/sharer/sharer.php?u=http://beataim.com/" target="_blank"><i
class="fa fa-facebook-square" aria-hidden="true"></i></a>
<a class="tw-share" href="https://twitter.com/home?status=http://beataim.com/" target="_blank"><i
class="fa fa-twitter-square" aria-hidden="true"></i></a>
<a class="gp-share" href="https://plus.google.com/share?url=http://beataim.com/" target="_blank"><i
class="fa fa-google-plus-square" aria-hidden="true"></i></a>
</div>
</div>
<div class="container">
<div class="nav fixed">
<ul>
<li><a class="logo" href="javascript:void(0);" onclick="meshki.openSidenav()"><i class="fa fa-bars"
aria-hidden="true"></i>Beat Aim</a>
</li>
<!-- <li class="nav-dropdown hide-on-mobile">
<a href="javascript:void(0)" class="nav-dropdown-button">Plugins</a>
<div class="nav-dropdown-content">
<a href="rtl/">RTL Mode (Persian)</a>
<a href="#extra-button-colors">Extra Button Colors</a>
</div>
</li> -->
<div class="hide-on-mobile">
<li><a href="/" target="_blank">Buy</a></li>
<li><a href="https://store.steampowered.com/newshub/app/1142220" target="_blank">News</a></li>
<li><a href="/roadmap">Roadmap</a></li>
<!-- <li><a href="make-account.html">Alpha sign up</a></li> -->
<li><a href="/esports">Esports League</a></li>
<li><a href="/streamers">Streamers League</a></li>
<li><a href="/top-new-maps">Mapping League</a></li>
<!-- <li><a href="redeem-key.html">Redeem alpha key</a></li> -->
<li><a href="/partners">Partners</a></li>
</div>
<!-- <li><a href="https://github.com/Borderliner/Meshki/blob/master/CHANGELOG.md">News</a></li>
<li><a href="https://github.com/Borderliner/Meshki">GitHub</a></li> -->
<!-- <li class="nav-dropdown hide-on-mobile">
<a href="javascript:void(0)" class="nav-dropdown-button">Components</a>
<div class="nav-dropdown-content">
<a href="#buttons-doc">Buttons</a>
<a href="#sidenav-doc">Sidenav</a>
<a href="#navbar-doc">Navbar</a>
<a href="#grid-doc">Grid System</a>
<a href="#form-doc">Forms</a>
<a href="#typography-doc">Typography</a>
<a href="#tables-doc">Tables</a>
<a href="#footer-doc">Footer</a>
</div>
</li> -->
<li class="nav-right">
<a href="https://discord.gg/2kW27Ez" target="_blank" style="padding-top: 12px; padding-right: 22px">
<img src="/imgs/discord-white.png" alt="discord" width="34px" height="38px">
</a>
</li>
<li class="nav-right">
<a href="https://twitter.com/beat_aim" target="_blank">
<img src="/imgs/twitterLogo.png" alt="twitter" width="34px" height="34px">
</a>
</li>
<li class="nav-right">
<a href="https://www.youtube.com/c/BeatAim" target="_blank"style="padding-top: 17px">
<img src="/imgs/youtube.png" alt="facebook" width="34px" height="26px">
</a>
</li>
<!-- <li class="nav-right" style="display:table;">-->
<!-- <a class="right-el-nav" href="https://discord.gg/2kW27Ez" target="_blank">-->
<!-- <img src="/imgs/discord.png" alt="discord" width="38px" height="38px">-->
<!-- </a>-->
<!-- <a class="right-el-nav" href="https://twitter.com/beat_aim" target="_blank">-->
<!-- <img src="/imgs/twitter.png" alt="twitter" width="34px" height="34px">-->
<!-- </a>-->
<!-- <a class="right-el-nav" href="https://www.facebook.com/BeatAim/" target="_blank">-->
<!-- <img src="/imgs/fb.png" alt="facebook" width="34px" height="34px">-->
<!-- </a>-->
<!-- </li>-->
<!-- <li class="nav-right hide-on-tablet">
<script type="text/javascript" src="finder.js"></script>
<input type="text" name="searchbox" id="searchbox" placeholder="Search..."
onkeydown="meshkiUtil.search(this)">
</li>
<li class="nav-right hide-on-tablet"><button class="green" onclick="meshkiUtil.search(true)"><i
class="fa fa-search" aria-hidden="true"></i></button></li> -->
</ul>
</div>
<div class="content">
<div class="row text-center">
<h2>📷 Streamers League 🎮</h2>
<div id="timer"></div>
<!-- <h3>Ends in:</h3>
<h4 id="timer"></h4> -->
<!-- <h3>Map pool:</h3> -->
<!-- <h5>Dragon War - Darkest Hour - Freaks</h5> -->
<div class="six offset-by-three col">
<h6>Tournament duration: 1st - 31st every month</h6>
<h6>Watch time of every Beat Aim streamer is added to the leaderboard below every 5 minutes. Currently only
Twitch
is supported. Let us know if you'd like to see other platforms.</h6>
<br><br>
<h3>Total Prizing:</h3>
<span id="totalPrize">Loading...</span>
<br><br><br>
</div>
<!-- <h3>Results:</h3> -->
<!-- <p>The best players across all leaderboards, updated every 10 mins.</p> -->
</div>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script> -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/hmac-sha256.js"></script> -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/hmac-sha256.min.js"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/hmac-sha256.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/enc-base64.min.js"></script>
<script type="text/javascript">
// function shuffleArray(array) {
// for (let i = array.length - 1; i > 0; i--) {
// const j = Math.floor(Math.random() * (i + 1));
// [array[i], array[j]] = [array[j], array[i]];
// }
// }
async function main() {
SetTimer();
var div = document.createElement("div");
div.className = "row text-center eight offset-by-two col";
let htmlString = '';
await AddWinners();
AddRules();
// div.insertAdjacentHTML('beforeend', '<br><h4>Current tournament ends in:</h4>');
div.insertAdjacentHTML('beforeend', '<br><br><br><a href="https://discord.gg/suKsKjfgyc" target="_blank" ><h4>Previous tournaments</h4></a>');
// div.insertAdjacentHTML('beforeend', '<a href="tournamentsArchive/weekly1" >Weekly #1</a>');
document.getElementsByClassName("content")[0].appendChild(div);
function SetTimer() {
var countDownDate;
var today = new Date();
// var today = new Date('April 30, 2020 22:00:00 GMT-01:00');
// var today = new Date('May 1, 2020 00:00:00 GMT+01:00');
// var today = new Date('April 30, 2020 24:00:00 GMT-01:00');
// var today = new Date('May 1, 2020 02:00:00 GMT+01:00');
// var prefix; // if (today..getUTCMonth() > )//today.getDate() > 0)// && today.getMonth() > 2)
// {
// if (today..getUTCMonth() > )//today.getDate() > 0)// && today.getMonth() > 2)
// {
prefix = "Ends in: ";
var lastDayOfMonth = Date.UTC(today.getUTCFullYear(), today.getUTCMonth() + 1, 1);
countDownDate = lastDayOfMonth;
if (today.getUTCMonth() == 3)
countDownDate = lastDayOfMonth = Date.UTC(today.getUTCFullYear(), today.getUTCMonth() + 2, 1);
// }
// else
// {
// prefix = "Starts in: ";
// // var EighthDayOfMonth = new Date(today.getFullYear(), today.getMonth() + 0, 8);
// // var firstDayOfMonth = new Date(today.getFullYear(), today.getMonth() + 1, 1);
// var firstDayOfMonth = Date.UTC(today.getUTCFullYear(), today.getUTCMonth() + 1, 1);
// countDownDate = firstDayOfMonth;
// }
// var countDownDate = new Date(tournamentsList.tournaments[tournamentsList.tournaments.length - 1].end).getTime();
// var countDownDate = new Date(tournamentsList.tournaments[0].end).getTime();
// var countDownDate = new Date("Mon 11, 2019 12:00:00").getTime();
var timerElement = document.getElementById("timer");
if (timerElement) {
var x = setInterval(UpdateTime, 1000);
UpdateTime();
function UpdateTime() {
var now = new Date().getTime();
var distance = countDownDate - now;
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// if (distance < 0)
// {
// clearInterval(x);
// timerElement.innerHTML = "Ended";
// }
// else
timerElement.innerHTML = prefix + days + "d " + hours + "h " + minutes + "m " + seconds + "s ";
}
}
}
async function AddWinners(tList) {
div.insertAdjacentHTML('beforeend', '<h3>Ranking:</h3>');
try {
htmlString += '<table class="expand hoverable" id="table-example"> \
<thead>\
<tr>\
<th>Place</th>\
<th>Player</th>\
<th>Watch time</th>\
<th>Prize</th>\
<th>Lang</th>\
</tr>\
</thead>\
<tbody>';
async function Dl() {
var leagueSaved = {};
leagueSaved.Date = new Date();
var fetched = await fetch(GetCdnLinkCacheBustedToOneMinute("twitchLeague.tsv"));
leagueSaved.Value = await fetched.text();
fetched = await fetch(GetCdnLinkCacheBustedToOneMinute("twitchLeaguePrizes.json"));
leagueSaved.Prizing = JSON.parse(await fetched.text());
window.localStorage.setItem("TwitchLeagueTsv", JSON.stringify(leagueSaved));
return leagueSaved;
// var accessData = GrtAzureAccessData("TwitchLeagueTsv", "Leaderboard");
// var fetched = await fetch(accessData.Url, { headers: accessData.Headers });
// var winnersJsonString = await fetched.text();
// var leagueSaved = JSON.parse(winnersJsonString);
// leagueSaved.Date = new Date();
// window.localStorage.setItem("TwitchLeagueTsv", JSON.stringify(leagueSaved));
// return leagueSaved;
}
// window.localStorage.removeItem("TwitchLeagueTsv");
var leagueSaved = JSON.parse(window.localStorage.getItem("TwitchLeagueTsv"));
if (!leagueSaved
|| !leagueSaved.hasOwnProperty("Value")
|| !leagueSaved.hasOwnProperty("Date"))
leagueSaved = await Dl();
else if (leagueSaved.hasOwnProperty("Date")
&& new Date().getTime() > new Date(leagueSaved.Date).getTime() + 1 * 60000)
leagueSaved = await Dl();
document.getElementById("totalPrize").textContent = leagueSaved.Prizing.TotalPrize;
var data = d3.tsvParse(leagueSaved.Value);
for (let i = 0; i < data.length || i < leagueSaved.Prizing.Prizes.length; i++) {
var place;
switch (i) {
case 0:
place = "🥇";
break;
case 1:
place = "🥈";
break;
case 2:
place = "🥉";
break;
default:
place = i + 1;
}
console.log("score: " + (data[i]?.score || 0));
var watchTimeTotalMinutes = (data[i]?.score || 0);
var watchTimeH = Math.floor(watchTimeTotalMinutes / 60);
var watchTimeM = watchTimeTotalMinutes % 60;
var watchTimeText = `<td>`;
if (watchTimeH > 0)
watchTimeText += `${watchTimeH}h `
watchTimeText += `${watchTimeM}min`
watchTimeText += `</td>`
console.log(leagueSaved);
htmlString += `<tr><td>${(place)}</td>` +
`<td>${(data[i]?.name || '-')}</td>` +
watchTimeText +
`<td>${(leagueSaved?.Prizing.Prizes[i] || "")}</td>`;
var country = data[i]?.country;
if (country) {
if (country == "us")
htmlString += `<td><i class="em em-${data[i].country.toLowerCase()}" aria-role="presentation"></i></td></tr>`;
else if (country == "en")
htmlString += `<td><i class="em em-gb" aria-role="presentation"></i></td></tr>`;
else
htmlString += `<td><i class="em em-flag-${data[i].country.toLowerCase()}" aria-role="presentation"></i></td></tr>`;
} else
htmlString += `<td></td></tr>`;
}
} catch (error) {
htmlString += 'error :(';
console.log(error)
}
htmlString += '</tbody>\
</table>';
div.insertAdjacentHTML('beforeend', htmlString);
}
function AddRules() {
div.insertAdjacentHTML('beforeend', '<br><h3>Rules:</h3>');
div.insertAdjacentHTML('beforeend', `<p>Valid paypal account is required to redeem the winnings.</p>`);
div.insertAdjacentHTML('beforeend', `<p>Player may be banned for unappropriated behavior including view bots, streaming other games when Beat Aim is selected as channel category etc.</p>`);
div.insertAdjacentHTML('beforeend', `<p>Player has to fill out google form posted in monthly Steam News.</p>`);
}
}
main();
</script>
</div>
<div class="footer " style="font-size: 10px">
<div class="row text-center">
<div class=" four col ">
<span>Created using Meshki by <a href=" https://github.com/Borderliner" target="_blank">Borderliner </a>
</span></div>
<div class=" four col ">
<a href="https://store.steampowered.com/app/1142220/Beat_Aim__Rhythm_Aim_Trainer/" target="_blank"
style="padding: 0px 10px">
<img src="/imgs/steamearly2.png" alt="BeatAimSteam" width="136px" height="22px">
</a>
</div>
<div class="four col">
<span>Few icons by <a href="http://www.freepik.com/" target="_blank">Freepik</a> from <a
href="http://www.flaticon.com/" target="_blank">www.flaticon.com </a></span>
</div>
</div>
</div>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js"></script>
<script type="text/javascript">
// var percent_update = function () {
// document.getElementById("percent_value").innerHTML = this.value;
// console.log(this.value);
// };
// document.getElementById("percent").onchange = percent_update;
// document.getElementById("percent").oninput = percent_update;
var clipboard = new Clipboard('.clipboard-btn');
clipboard.on('success', function (e) {
var classArray = e.trigger.className.split(' ');
classArray.splice(classArray.indexOf('blue'), 1);
classArray.push('green');
e.trigger.className = classArray.join(' ');
e.trigger.innerHTML = '<i class="fa fa-check" aria-hidden="true"></i> Copied';
window.setTimeout(function () {
var classArray = e.trigger.className.split(' ');
classArray.splice(classArray.indexOf('green'), 1);
classArray.push('blue');
e.trigger.className = classArray.join(' ');
e.trigger.innerHTML = '<i class="fa fa-clipboard" aria-hidden="true"></i>';
}, 2000);
});
clipboard.on('error', function (e) {
var classArray = e.trigger.className.split(' ');
classArray.splice(classArray.indexOf('blue'), 1);
classArray.push('red');
e.trigger.className = classArray.join(' ');
e.trigger.innerHTML = '<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Error';
window.setTimeout(function () {
var classArray = e.trigger.className.split(' ');
classArray.splice(classArray.indexOf('red'), 1);
classArray.push('blue');
e.trigger.className = classArray.join(' ');
e.trigger.innerHTML = '<i class="fa fa-clipboard" aria-hidden="true"></i>';
}, 2000);
});
</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/prism.min.js"></script>
</body>
</html>