blob: 71fe0c7ef281e6b1817012acbb1fbbda048c2fe1 (
plain)
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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="View the top 100 bingo players">
<meta name="keywords" content="bingo, hypixel, skyblock, hypixel skyblock">
<meta name="robots" content="index, follow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="English">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap" rel="stylesheet">
<title>Leaderboard | skyblock.bingo</title>
</head>
<style>
body {
font-family: 'Atkinson Hyperlegible', sans-serif;
margin: 0px;
overflow-x: hidden;
color: #bebebe;
background-color: #070F15;
}
table {
border-collapse: collapse;
width: 100%;
}
th {
text-align: center;
background-color: #000000;
color: white;
padding: 5px;
height: 24px;
position: sticky;
top: 0;
}
td {
border-bottom: 1px solid #494949;
text-align: center;
padding: 8px;
width: calc(100% / 3);
}
td img {
margin-left: 8px;
height: 30px;
vertical-align: middle;
border-radius: 3px;
}
</style>
<body>
<table id="output">
<tr>
<th>Ranking</th>
<th>Player</th>
<th>Points</th>
</tr>
</table>
</body>
<script>
window.onload = function() {
output = document.getElementById('output');
fetch(`https://skyblock.bingo/api/leaderboard`)
.then(response => response.json())
.then(data => {
for(i = 0; i < data.leaderboard.length; i++) {
tr = output.insertRow();
var ranking = tr.insertCell();
ranking.innerHTML = i+1;
var head = document.createElement('img');
head.src = `https://mc-heads.net/avatar/${data.leaderboard[i].uuid}`;
var player = tr.insertCell();
var username = document.createElement('span');
username.innerHTML = data.leaderboard[i].name;
if (data.leaderboard[i].hypixel_rank == 'ADMIN' || data.leaderboard[i].hypixel_rank == 'YOUTUBER') {
username.style.color = '#FF5555';
} else if (data.leaderboard[i].hypixel_rank == 'MODERATOR') {
username.style.color = '#00AA00';
} else if (data.leaderboard[i].hypixel_rank == 'HELPER') {
username.style.color = '#0000AA';
} else if (data.leaderboard[i].hypixel_rank == 'SUPERSTAR') {
username.style.color = '#FFAA00';
} else if (data.leaderboard[i].hypixel_rank == 'MVP_PLUS') {
username.style.color = '#55FFFF';
} else if (data.leaderboard[i].hypixel_rank == 'MVP') {
username.style.color = '#55FFFF';
} else if (data.leaderboard[i].hypixel_rank == 'VIP_PLUS') {
username.style.color = '#55FF55';
} else if (data.leaderboard[i].hypixel_rank == 'VIP') {
username.style.color = '#55FF55';
}
player.appendChild(username);
player.appendChild(head);
var points = tr.insertCell();
points.innerHTML = data.leaderboard[i].points;
tr.appendChild(points, player, ranking);
}
})
document.body.appendChild(output);
}
</script>
</html>
|