diff --git a/WebfrontCore/wwwroot/js/profile.js b/WebfrontCore/wwwroot/js/profile.js index a5f3e5e05..54b262773 100644 --- a/WebfrontCore/wwwroot/js/profile.js +++ b/WebfrontCore/wwwroot/js/profile.js @@ -96,7 +96,7 @@ $('.ip-locate-link').click(function (e) { e.preventDefault(); const ip = $(this).data("ip"); - $.getJSON( `http://ip-api.com/json/${ip}`) + $.getJSON(`https://ipwhois.app/json/${ip}`) .done(function (response) { $('#mainModal .modal-title').text(ip); $('#mainModal .modal-body').text(''); @@ -106,18 +106,21 @@ if (response.org.length > 0) { $('#mainModal .modal-body').append(`${_localization['WEBFRONT_PROFILE_LOOKUP_ORG']} — ${response.org}
`); } - if (response.regionName.length > 0 || response.city.length > 0 || response.country.length > 0) { + if (response.region.length > 0 || response.city.length > 0 || response.country.length > 0 || response.timezone_gmt.length > 0) { $('#mainModal .modal-body').append(`${_localization['WEBFRONT_PROFILE_LOOKUP_LOCATION']} — `); } if (response.city.length > 0) { $('#mainModal .modal-body').append(response.city); } - if (response.regionName.length > 0) { - $('#mainModal .modal-body').append((response.regionName.length > 0 ? ', ' : '') + response.region); + if (response.region.length > 0) { + $('#mainModal .modal-body').append((response.region.length > 0 ? ', ' : '') + response.region); } if (response.country.length > 0) { $('#mainModal .modal-body').append((response.country.length > 0 ? ', ' : '') + response.country); } + if (response.timezone_gmt.length > 0) { + $('#mainModal .modal-body').append((response.timezone_gmt.length > 0 ? ', ' : '') + response.timezone_gmt); + } $('#mainModal').modal(); })