1
0
mirror of https://github.com/MailHops/mailhops-plugin.git synced 2025-05-18 07:10:09 -07:00

Updated display of first hop

This commit is contained in:
Andrew Van Tassel 2015-09-18 11:23:29 -06:00
parent 0da1fc046c
commit f0f165527a
2 changed files with 6 additions and 6 deletions

View File

@ -425,7 +425,7 @@ var mailHopsDisplay =
if(!!city && !!state) if(!!city && !!state)
displayText = city+', '+state; displayText = city+', '+state;
else if(!!city) else if(!!city)
displayText = city; displayText = city+', '+countryCode;
else if(!!countryName) else if(!!countryName)
displayText = countryName; displayText = countryName;

View File

@ -193,13 +193,13 @@ var mailHopsDisplay =
for(var i=0; i<response.route.length;i++){ for(var i=0; i<response.route.length;i++){
//get the first hop location //get the first hop location
if(!gotFirst && !response.route[i].private && !response.route[i].client){ if(!gotFirst && !response.route[i].private && !response.route[i].client){
if(response.route[i].countryCode) if(!!response.route[i].countryCode)
image='chrome://mailhops/content/images/flags/'+response.route[i].countryCode.toLowerCase()+'.png'; image='chrome://mailhops/content/images/flags/'+response.route[i].countryCode.toLowerCase()+'.png';
if(response.route[i].city) if(!!response.route[i].city)
city=response.route[i].city; city=response.route[i].city;
if(response.route[i].state) if(!!response.route[i].state)
state=response.route[i].state; state=response.route[i].state;
if(response.route[i].countryName) if(!!response.route[i].countryName)
countryName=response.route[i].countryName; countryName=response.route[i].countryName;
gotFirst=true; gotFirst=true;
} }
@ -286,7 +286,7 @@ var mailHopsDisplay =
if(!!city && !!state) if(!!city && !!state)
displayText = city+', '+state; displayText = city+', '+state;
else if(!!city) else if(!!city)
displayText = city; displayText = city+', '+countryCode;
else if(!!countryName) else if(!!countryName)
displayText = countryName; displayText = countryName;