1
0
mirror of https://github.com/XLabsProject/iw4x-rawfiles.git synced 2023-08-02 15:02:11 +02:00

maint: update html webfront

This commit is contained in:
FutureRave 2023-03-28 18:07:11 +01:00
parent 3bc879cf01
commit 4d9d45899f
No known key found for this signature in database
GPG Key ID: 22F9079C86CFAB31
2 changed files with 6 additions and 11 deletions

View File

@ -18,7 +18,7 @@
<table id="serverinfo">
<thead>
<tr>
<th colspan="3">Serverinfo</th>
<th colspan="4">Serverinfo</th>
</tr>
</thead>
</table>
@ -27,6 +27,7 @@
<thead>
<tr>
<th>Player</th>
<th>Test Client</th>
<th>Score</th>
<th>Ping</th>
</tr>
@ -34,9 +35,9 @@
<tbody id="players">
</tbody>
</table>
<!-- <div id="footer">
<div id="footer">
Get IW4x!
</div> -->
</div>
</body>
</html>

View File

@ -17,16 +17,12 @@ function getFfType (data)
{
case 0:
return "Disabled";
break;
case 1:
return "Enabled";
break;
case 2:
return "Reflected";
break;
case 3:
return "Shared";
break;
default:
return "Disabled";
}
@ -34,7 +30,6 @@ function getFfType (data)
function getServerInfo(status, countPlayers)
{
var friendlyFire = status.scr_team_fftype;
var mod = status.fs_game;
if (!mod)
@ -59,6 +54,7 @@ function buildPlayerList(players)
{
var row = "<tr>";
row += "<td>" + players[i].name + "</td>";
row += "<td>" + players[i].test_client + "</td>";
row += "<td>" + players[i].score + "</td>";
row += "<td>" + players[i].ping + "</td>";
row += "</tr>";
@ -81,8 +77,6 @@ function buildPage(data)
document.title = hostname
$("#servername").text(document.title);
//$("#info").text(JSON.stringify(data));
getServerInfo(data["status"], data["players"].length);
buildPlayerList(data["players"]);
@ -107,6 +101,6 @@ $(document).ready(function()
$("#footer").click(function()
{
location.replace("https://iw4xcachep26muba.onion.to");
location.replace("https://xlabs.dev");
});
});