finished server selection for live radar and adding it as button to home screen

only update flag for recent players if country code is available
This commit is contained in:
RaidMax
2019-07-19 10:33:00 -05:00
parent 5c90228320
commit 38f1169061
8 changed files with 54 additions and 16 deletions

View File

@ -39,8 +39,6 @@
<Content Remove="Views\Plugins\Stats\_MessageContext.cshtml" />
<Content Remove="Views\Plugins\Stats\_PenaltyInfo.cshtml" />
<Content Remove="Views\Plugins\_ViewImports.cshtml" />
<Content Remove="wwwroot\css\bootstrap-custom.css" />
<Content Remove="wwwroot\css\bootstrap-custom.min.css" />
</ItemGroup>
<ItemGroup>

View File

@ -95,7 +95,9 @@ $(document).ready(function () {
$.each(ipAddresses, function (index, address) {
$.get('https://ip2c.org/' + $(address).data('ip'), function (result) {
const countryCode = result.split(';')[1].toLowerCase();
$(address).css('background-image', `url(https://www.countryflags.io/${countryCode}/flat/64.png)`);
if (countryCode != 'zz') {
$(address).css('background-image', `url(https://www.countryflags.io/${countryCode}/flat/64.png)`);
}
});
});
}