Will print the port only if it is custom

This commit is contained in:
Chris 2016-10-08 01:15:47 +01:00 committed by GitHub
parent d52652e8a2
commit 1595b3e904

@ -197,6 +197,14 @@ function validateBootTime(bootTime, socket) {
} }
} }
function printPort(port) {
if(port == undefined || port == 25565) {
return "";
} else {
return ":" + port;
}
}
$(document).ready(function() { $(document).ready(function() {
var socket = io.connect({ var socket = io.connect({
reconnect: true, reconnect: true,
@ -347,7 +355,7 @@ $(document).ready(function() {
</div>\ </div>\
<div class="column" style="width: 220px;">\ <div class="column" style="width: 220px;">\
<h3>' + info.name + '&nbsp;<span class="type">' + info.type + '</span></h3>\ <h3>' + info.name + '&nbsp;<span class="type">' + info.type + '</span></h3>\
<span class="color-gray url">' + info.ip + '</span>\ <span class="color-gray url">' + info.ip + printPort(info.port) + '</span>\
<div id="version_' + safeName(info.name) + '" class="versions"><span class="version"></span></div>\ <div id="version_' + safeName(info.name) + '" class="versions"><span class="version"></span></div>\
<span id="status_' + safeName(info.name) + '">Waiting</span>\ <span id="status_' + safeName(info.name) + '">Waiting</span>\
</div>\ </div>\