-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
211 lines (203 loc) · 11.3 KB
/
index.html
File metadata and controls
211 lines (203 loc) · 11.3 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>NovaColumn - Minecraft Server Database</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/mcmotd.css">
<link rel="shortcut icon" href="assets/nova.png" type="image/x-icon">
<meta content="NovaColumn - Minecraft Server Database" property="og:title" />
<meta content="NovaColumn gathers Minecraft server info, logging historical player count, usernames/UUIDs, addresses and ports, Minecraft version, signed message status, and server icons. NovaColumn is a research group dedicated to analysis of Minecraft's community." property="og:description" />
<meta content="https://novacolumn.com" property="og:url" />
<meta content="https://novacolumn.com/assets/nova.png" property="og:image" />
<meta content="#9933ff" data-react-helmet="true" name="theme-color" />
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/gh/nailujx86/mcmotdparser@master/dist/motdparserweb.js" type="text/javascript"></script>
</head>
<body>
<div class="top-wrapper">
<a href="about"><img src="assets/DiamondBlock.png" class="about" alt="About"></a>
<div class="center-container">
<button class="button-wrapper spacer" id="findServerButton" onclick="update(); play();"><span>Find Random Server</span></button>
<button onclick="copy(); play();" class="button-wrapper" id="copyButton"><span>Copy IP</span></button>
</div>
<div class="center-container">
<a class="ip" id="displayIP" href="https://mcsrvstat.us/server/" target="_blank">Unavailable</a><p class="ping" id="displayPing">(Unavailable)</p>
</div>
</div>
<div class="motdbox" id="motd">Unavailable</div>
<div class="row-container">
<div class="item playerlist" id="plist">
<a id="username" style="display: none" href="https://namemc.com/profile/" target="_blank">Unavailable</a><div id="valid" class="dot" title="Unavailable"></div>
<span id="userID" style="display: none" class="uuid">Unavailable</span>
</div>
<div class="container-alignment">
<p><span id="displayVer" class="verIndent">Unavailable</span><a title="The version of Minecraft the server is using." id="verHelp" class="help"> (?)</a></p>
<p id="playerCount">Playercount: Unavailable</p>
<p><span id="signed">Reporting: Unavailable</span><a title="Report players in-game for messages, skins, or names." class="help">(?)</a></p>
<img id="icon" src="" alt="Broken icon!" class="icon"><br>
</div>
</div>
<div class="row-container2">
<div class="chart-container" id="chartContainer">
<canvas id="graph"></canvas>
</div>
</div>
<p class="scanned" id="date">Last scanned on: Unavailable</p>
<div class="socials">
<a href="https://discord.gg/FtSqu7FzHJ">
<svg class="discord" viewBox="0 0 24.00 24.00" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="" transform="rotate(0)matrix(1, 0, 0, 1, 0, 0)" stroke-width="0.00024000000000000003"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" stroke="#CCCCCC" stroke-width="0.096"></g><g id="SVGRepo_iconCarrier"> <path d="M18.59 5.88997C17.36 5.31997 16.05 4.89997 14.67 4.65997C14.5 4.95997 14.3 5.36997 14.17 5.69997C12.71 5.47997 11.26 5.47997 9.83001 5.69997C9.69001 5.36997 9.49001 4.95997 9.32001 4.65997C7.94001 4.89997 6.63001 5.31997 5.40001 5.88997C2.92001 9.62997 2.25001 13.28 2.58001 16.87C4.23001 18.1 5.82001 18.84 7.39001 19.33C7.78001 18.8 8.12001 18.23 8.42001 17.64C7.85001 17.43 7.31001 17.16 6.80001 16.85C6.94001 16.75 7.07001 16.64 7.20001 16.54C10.33 18 13.72 18 16.81 16.54C16.94 16.65 17.07 16.75 17.21 16.85C16.7 17.16 16.15 17.42 15.59 17.64C15.89 18.23 16.23 18.8 16.62 19.33C18.19 18.84 19.79 18.1 21.43 16.87C21.82 12.7 20.76 9.08997 18.61 5.88997H18.59ZM8.84001 14.67C7.90001 14.67 7.13001 13.8 7.13001 12.73C7.13001 11.66 7.88001 10.79 8.84001 10.79C9.80001 10.79 10.56 11.66 10.55 12.73C10.55 13.79 9.80001 14.67 8.84001 14.67ZM15.15 14.67C14.21 14.67 13.44 13.8 13.44 12.73C13.44 11.66 14.19 10.79 15.15 10.79C16.11 10.79 16.87 11.66 16.86 12.73C16.86 13.79 16.11 14.67 15.15 14.67Z" fill="#7289d9"></path> </g></svg>
</a>
</div>
<script>
async function play() {
new Audio("assets/click.ogg").play();
}
var list = document.getElementById("plist");
var usernamebase = document.getElementById("username").cloneNode(true);
var useridbase = document.getElementById("userID").cloneNode(true);
var validbase = document.getElementById("valid").cloneNode(true);
function copy() {
var ip = document.getElementById("displayIP").innerHTML;
navigator.clipboard.writeText(ip);
var button = document.getElementById("copyButton");
button.innerHTML = "<span>Copied!</span>";
setTimeout(function() {
button.innerHTML = "<span>Copy IP</span>";
}, 500)
};
function addplayer(usernamestring, uuid, validity) {
var username = usernamebase.cloneNode(true);
var userid = useridbase.cloneNode(true);
var valid = validbase.cloneNode(true);
username.style.display = "inline-block";
userid.style.display = "inline-block";
username.innerHTML = usernamestring;
username.href += uuid;
userid.innerHTML = "(" + uuid + ")";
if (validity === 'true') {
valid.className = "dot valid";
valid.title = "Valid account";
} else if (validity === 'false') {
valid.className = "dot invalid";
valid.title = "Cracked account";
} else if (validity === 'waiting') {
valid.className = "dot waiting";
valid.title = "Waiting for validation";
}
userid.id = "";
username.id = "";
valid.id = "";
list.appendChild(username);
list.appendChild(valid);
list.appendChild(document.createElement("br"));
list.appendChild(userid);
list.appendChild(document.createElement("br"));
list.appendChild(document.createElement("br"));
};
function clearplayers() {
list.innerHTML = "<br>";
};
const ctx = document.getElementById('graph').getContext('2d');
const graph = new Chart(ctx, {
type: 'line',
data: {
labels: [],
datasets: [{
label: 'Playercount History',
data: [],
backgroundColor: [
'rgba(54, 162, 235, 0.6)',
],
borderColor: [
'rgba(54, 162, 235, 1)',
],
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
x: {
display: false
},
y: {
grid: {
color: 'rgba(255, 255, 255, 1)'
},
ticks: {
color: 'white',
stepSize: 1
},
beginAtZero: true
}
},
plugins: {
legend: {
labels: {
color: 'white',
font: {
size: 14
}
}
}
}
}
});
function updateChartData(newData) {
graph.data.labels = newData.playergraph[0];
graph.data.datasets[0].data = newData.playergraph[1];
graph.update();
};
function update() {
fetch("http://localhost:8080").then(function(response) {
if(!response.ok) {
throw new Error("API not ok");
}
return response.json();
}).then(function(data) {
clearplayers();
var icon = document.getElementById("icon");
if(data.icon == "NO_ICON") {
data.icon = "assets/pack.png";
}
icon.src = data.icon;
var ip = document.getElementById("displayIP");
var formatted = data.ip + ":" + data.port;
ip.innerHTML = formatted;
ip.href = "https://mcsrvstat.us/server/" + formatted;
var version = document.getElementById("displayVer");
version.innerHTML = data.version;
var ping = document.getElementById("displayPing");
ping.innerHTML = "(" + data.ping + "ms" + ")";
var motd = document.getElementById("motd");
motdParser.toHtml(data.motd, function(error, response) {
motd.innerHTML = response;
});
var players = data.players;
var uuids = data.playersid;
if(players.length == 0) {
addplayer("NO_PLAYERS", "00000000-0000-0000-0000-000000000000", data.validity)
}
for(var i = 0; i < players.length; i++) {
addplayer(players[i], uuids[i], data.validity[i]);
}
var playercount = document.getElementById("playerCount");
playercount.innerHTML = "Playercount: " + data.playercount + "/" + data.playermax;
var signed = document.getElementById("signed");
signed.innerHTML = "Reporting: " + ((data.signed == 1) ? "Enabled" : "Disabled");
var date = document.getElementById("date");
date.innerHTML = "Last scanned on: " + data.time;
updateChartData(data);
}).catch(function(error) {
throw new Error("Parsing error");
});
};
update();
</script>
</body>
</html>