1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

small code cleanups

This commit is contained in:
RaidMax
2019-07-19 14:54:39 -05:00
parent 4a013a98f8
commit 486973a2bc
8 changed files with 44 additions and 45 deletions

View File

@ -55,7 +55,7 @@ $('.server-history-row').each(function (index, element) {
let clientHistory = $(this).data('clienthistory');
let serverId = $(this).data('serverid');
let maxClients = parseInt($('#server_header_' + serverId + ' .server-maxclients').text());
let color = $(this).data('online') === 'True' ? 'rgba(0, 122, 204, 0.432)' : '#ff6060'
let color = $(this).data('online') === 'True' ? 'rgba(0, 122, 204, 0.432)' : '#ff6060';
let width = $('.server-header').first().width();
let historyChart = getPlayerHistoryChart(clientHistory, serverId, width, color, maxClients);
historyChart.render();
@ -89,10 +89,10 @@ function refreshClientActivity() {
});
}
$(document).ready(function() {
$(document).ready(function () {
$('.server-join-button').click(function (e) {
$(this).children('.server-header-ip-address').show();
});
})
});
setInterval(refreshClientActivity, 2000);