-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
148 lines (128 loc) · 6.28 KB
/
index.html
File metadata and controls
148 lines (128 loc) · 6.28 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
<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<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 href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
.danger-circle {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 5px;
}
.danger-circle.high { background-color: #dc3545; }
.danger-circle.medium { background-color: #ffc107; }
.danger-circle.low { background-color: #0dcaf0; }
abbr[title] {
text-decoration: none;
cursor: help;
}
</style>
</head>
<body>
<div class="container">
<h1 class="text-center mt-4">List of bad Old Minecraft PE players</h1>
<h3 class="text-center mt-2">Players on this list are not recommended to be allowed on the servers. <a href="adding.html">You want to add a player?</a></h3>
<hr>
<p id="playerCount" class="text-center">0 players on list</p>
<div class="mb-3">
<h5>Danger level:</h5>
<span class="danger-circle high"></span> High
<span class="danger-circle medium ms-3"></span> Medium
<span class="danger-circle low ms-3"></span> Low
</div>
<div class="alert alert-primary" role="alert">Try a <a href="https://www.nostalgiaforum.xyz/index.php?resources/144/" target="_blank">plugin</a> for NostalgiaCore, which will automatically perform the specified actions if a player from this list logs into the server.</div>
<div class="mb-3">
<input type="text" id="searchInput" class="form-control" placeholder="Search...">
</div>
<div class="table-responsive">
<table id="blacklistTable" class="table table-striped table-bordered">
<thead>
<tr>
<th>Player</th>
<th>Reason</th>
<th>Twinks</th>
<th>Discord</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<footer class="text-center mt-4">
<p>© 2024 Legacy Minecraft PE. We are not affiliated with Mojang. All brands and trademarks belong to their respective owners.</p>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<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 dangerCircle = document.createElement("span");
dangerCircle.classList.add("danger-circle", entry.dangerLevel);
playerNameCell.appendChild(dangerCircle);
const playerNameLink = document.createElement("a");
playerNameLink.textContent = entry.playerName;
playerNameLink.href = `banned/${encodeURIComponent(entry.playerName)}.html`;
playerNameLink.classList.add("text-decoration-none");
playerNameCell.appendChild(playerNameLink);
if (entry.note) {
const noteAbbr = document.createElement("abbr");
noteAbbr.setAttribute("title", entry.note);
noteAbbr.textContent = " (Note)";
noteAbbr.classList.add("ms-1", "text-muted");
playerNameCell.appendChild(noteAbbr);
}
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.classList.remove("d-none");
} else {
row.classList.add("d-none");
}
});
}
})
.catch(error => {
console.error("Error loading data:", error);
});
</script>
</body>
</html>