forked from LegacyMinecraftPE/blacklist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
208 lines (174 loc) · 6.3 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Old MinecraftPE Bans</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<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=JetBrains+Mono:ital,wght@0,400;0,500;0,700;1,400&family=Open+Sans:wght@400;500;700&family=REM&family=Titillium+Web:ital,wght@0,400;0,700;1,400&family=Unbounded:wght@400;500;700;900&display=swap" rel="stylesheet">
<style>
body {
font-family: 'JetBrains Mono', monospace;
background-color: #0e0e0e;
color: #fff;
margin: 0px;
padding-left: 8px;
padding-right: 8px;
}
h1 {
text-align: center;
padding: 20px;
}
h3 {
text-align: center;
padding: 10px;
}
mark {
background-color: #333333;
color: #fff;
padding: 3px;
}
table {
border-collapse: collapse;
text-align: center;
width: 100%;
table-layout: fixed;
margin: 20px auto;
border-spacing: 0px;
}
th {
background-color: #111111;
color: #fff;
padding: 10px;
}
th,
td {
border: 1px solid #292a2b;
text-align: center;
padding: 10px;
}
td.player {
color: red;
background-color: #0e0e0e;
}
p#playerCount {
text-align: center;
padding: 10px;
}
a {
color: red;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
#search {
text-align: center;
margin: 10px auto;
}
#searchInput {
padding: 5px;
width: 60%;
font-family: 'JetBrains Mono', monospace;
background-color: #111111;
border: 1px solid #292a2b;
color: #fff;
}
#searchButton {
padding: 5px 10px;
background-color: #111111;
color: #fff;
border: none;
cursor: pointer;
font-family: 'JetBrains Mono', monospace;
}
mark {
background-color: #333333;
color: #fff;
padding: 3px;
}
</style>
</head>
<body>
<h1>List of bad Old Minecraft PE players</h1>
<h3>Players from this list are not recommended to be allowed on the servers. You can offer to add a player to the list, write to Discord <mark>@eqozqq</mark>.</h3>
<hr>
<p id="playerCount">0 players on list</p>
<div id="search">
<input type="text" id="searchInput" placeholder="Search...">
</div>
<table id="blacklistTable">
<thead>
<tr>
<th>Player</th>
<th>Reason</th>
<th>Twinks</th>
<th>Discord</th>
</tr>
</thead>
<tbody>
<!-- List -->
</tbody>
</table>
<center><footer>
<p>© 2023 Legacy Minecraft PE. We are not affiliated with Mojang. All brands and trademarks belong to their respective owners.</p>
</footer></center>
<script>
fetch("banned.json")
.then(response => response.json())
.then(data => {
const tableBody = document.querySelector("#blacklistTable tbody");
const playerCountElement = document.getElementById("playerCount");
data.forEach(entry => {
const row = document.createElement("tr");
const playerNameCell = document.createElement("td");
const playerNameLink = document.createElement("a");
playerNameLink.textContent = entry.playerName;
playerNameLink.href = `banned/${encodeURIComponent(entry.playerName)}.html`;
playerNameCell.appendChild(playerNameLink);
row.appendChild(playerNameCell);
const banReasonCell = document.createElement("td");
banReasonCell.textContent = entry.banReason;
row.appendChild(banReasonCell);
const twinksCell = document.createElement("td");
twinksCell.textContent = entry.twinks;
row.appendChild(twinksCell);
const discordCell = document.createElement("td");
discordCell.textContent = entry.discord;
row.appendChild(discordCell);
tableBody.appendChild(row);
});
playerCountElement.textContent = `${data.length} players on list`;
const searchInput = document.getElementById("searchInput");
searchInput.addEventListener("input", () => {
const searchTerm = searchInput.value.toLowerCase();
filterTableBySearchTerm(searchTerm);
});
function filterTableBySearchTerm(term) {
const rows = tableBody.querySelectorAll("tr");
rows.forEach(row => {
const playerName = row.querySelector("td a").textContent.toLowerCase();
const banReason = row.querySelector("td:nth-child(2)").textContent.toLowerCase();
const twinks = row.querySelector("td:nth-child(3)").textContent.toLowerCase();
const discord = row.querySelector("td:nth-child(4)").textContent.toLowerCase();
if (
playerName.includes(term) ||
banReason.includes(term) ||
twinks.includes(term) ||
discord.includes(term)
) {
row.style.display = "";
} else {
row.style.display = "none";
}
});
}
})
.catch(error => {
console.error("Error loading data:", error);
});
</script>
</body>
</html>