File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,14 @@ function health_discover(root) {
7474
7575function health_flag ( host ) {
7676 var $td = $ ( '#health td[data-ip="' + host + '"]' ) ;
77- $ . getJSON ( 'https://ssl.geoplugin.net/json.gp?k=af0ad95fd7caa623&ip=' + $td . data ( 'ip' ) , function ( json ) {
78- var country = json . geoplugin_countryCode ;
79- $td . html ( '<img src="https://flagpedia.net/data/flags/normal/' +
80- country . toLowerCase ( ) + '.png" alt="' + country + '" style="width:1em;"/>' ) ;
81- } ) . fail ( function ( ) { $td . text ( '?' ) ; } ) ;
77+ var ip = $td . data ( 'ip' ) ;
78+ if ( ip . match ( / ^ [ 0 - 9 \. ] + $ / ) ) {
79+ $ . getJSON ( 'https://ssl.geoplugin.net/json.gp?k=af0ad95fd7caa623&ip=' + ip , function ( json ) {
80+ var country = json . geoplugin_countryCode ;
81+ $td . html ( '<img src="https://flagpedia.net/data/flags/normal/' +
82+ country . toLowerCase ( ) + '.png" alt="' + country + '" style="width:1em;"/>' ) ;
83+ } ) . fail ( function ( ) { $td . text ( '?' ) ; } ) ;
84+ }
8285}
8386
8487function health_check_wallet ( ) {
You can’t perform that action at this time.
0 commit comments