add country flag and name to profile
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
$(document).ready(function () {
|
||||
/*
|
||||
Expand alias tab if they have any
|
||||
*/
|
||||
/*
|
||||
Expand alias tab if they have any
|
||||
*/
|
||||
$('#profile_aliases_btn').click(function (e) {
|
||||
const aliases = $('#profile_aliases').text().trim();
|
||||
if (aliases && aliases.length !== 0) {
|
||||
@ -10,6 +10,14 @@
|
||||
}
|
||||
});
|
||||
|
||||
const ipAddresses = $('.ip-lookup-profile');
|
||||
$.each(ipAddresses, function (index, address) {
|
||||
$.get('http://ip-api.com/json/' + $(address).data('ip'), function (result) {
|
||||
const country = result['country'];
|
||||
$('#ip_lookup_country').text(country)
|
||||
});
|
||||
});
|
||||
|
||||
/* set the end time for initial event query */
|
||||
startAt = $('.loader-data-time').last().data('time');
|
||||
|
||||
@ -35,7 +43,7 @@
|
||||
|
||||
$(this).children().filter('.client-message-prefix').removeClass('oi-chevron-right');
|
||||
$(this).children().filter('.client-message-prefix').addClass('oi-chevron-bottom');
|
||||
|
||||
|
||||
$.get('/Stats/GetMessageAsync', {
|
||||
'serverId': $(this).data('serverid'),
|
||||
'when': $(this).data('when')
|
||||
@ -102,7 +110,7 @@
|
||||
$('#mainModal .modal-body').append(response.city);
|
||||
}
|
||||
if (response.region.length > 0) {
|
||||
$('#mainModal .modal-body').append((response.city.length > 0 ? ', ' : '') + response.region);
|
||||
$('#mainModal .modal-body').append((response.city.length > 0 ? ', ' : '') + response.region);
|
||||
}
|
||||
if (response.country.length > 0) {
|
||||
$('#mainModal .modal-body').append((response.country.length > 0 ? ', ' : '') + response.country);
|
||||
|
Reference in New Issue
Block a user