diff --git a/chrome/content/mailhops.js b/chrome/content/mailhops.js index 4f57da8..903d126 100644 --- a/chrome/content/mailhops.js +++ b/chrome/content/mailhops.js @@ -171,7 +171,6 @@ mailHops.getRoute = function(){ //lists box var headListUnsubscribe = mailHops.options.show_lists ? mailHops.headers.extractHeader ( "List-Unsubscribe" , false ) : null; - var received_ips; var all_ips = new Array(); var rline = ''; //empty secure @@ -186,34 +185,31 @@ mailHops.getRoute = function(){ } //loop through the received headers and parse for IP addresses - if ( headReceived ){ - var headReceivedArr = headReceived.split('\n'); - if(headReceivedArr.length != 0){ - for ( var h=0; h= 240 //IANA-RESERVED ){ - validIP = false; + //only if there is one instance of this IP + if(header.indexOf(ip) == header.lastIndexOf(ip)) + validIP = false; } else { //check if this IP was part of a secure transmission if(header.indexOf('using SSL') != -1){ diff --git a/chrome/content/pb-overlay.js b/chrome/content/pb-overlay.js index e2019f1..527615f 100644 --- a/chrome/content/pb-overlay.js +++ b/chrome/content/pb-overlay.js @@ -78,7 +78,7 @@ var mailHopsDisplay = if(header_unsubscribe){ var listArr=header_unsubscribe.split(','); var href=''; - if(listArr.length!=0){ + if(listArr.length){ for(var h=0;h',''); var label = document.createElement('label'); @@ -338,7 +338,7 @@ var mailHopsDisplay = mailHopsUtils.launchWhoIs(this.getAttribute('data-ip')); }, false); } else { - label.setAttribute('value','Hop #'+(i+1)+' Private'); + label.setAttribute('value','Hop #'+(i+1)+' Private'); } //build tooltip diff --git a/chrome/content/utils.js b/chrome/content/utils.js index 92e71e9..d53ef90 100644 --- a/chrome/content/utils.js +++ b/chrome/content/utils.js @@ -153,9 +153,7 @@ launchMap: function(route,options){ }, getAPIUrl: function(options){ - if(!!options.api_key && options.api_key != '') - return options.api_http+options.api_host+'/v2'; - return options.api_http+options.api_host+'/v1'; + return options.api_http+options.api_host+'/v2'; }, getAPIUrlParams: function(options){