1
0
mirror of https://github.com/MailHops/mailhops-plugin.git synced 2025-05-19 07:40:08 -07:00

Minor change moving existing logic for adding the Originating IP to the route list array.

This commit is contained in:
Andrew Van Tassel 2012-02-23 15:06:05 -07:00
parent 836efb18b2
commit 184f573083
3 changed files with 9 additions and 9 deletions

View File

@ -24,7 +24,7 @@ var mailHops =
showWeather: false, showWeather: false,
map: 'goog', map: 'goog',
unit: 'mi', unit: 'mi',
appVersion: 'MailHops Postbox 0.6.8' appVersion: 'MailHops Postbox 0.6.9'
} }
mailHops.init = function() mailHops.init = function()
@ -174,12 +174,6 @@ var regexAllIp = /(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)\.(1\d{
var received_ips; var received_ips;
var all_ips = new Array(); var all_ips = new Array();
var rline=''; var rline='';
//get the originating IP address
if(headXOrigIP){
var ip = headXOrigIP.match(regexAllIp);
if(ip != null && ip.length != 0)
all_ips.unshift( ip[0] );
}
//loop through the received headers and parse for IP addresses //loop through the received headers and parse for IP addresses
if ( headReceived ){ if ( headReceived ){
@ -207,6 +201,12 @@ var regexAllIp = /(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)\.(1\d{
} }
} }
} }
//get the originating IP address
if(headXOrigIP){
var ip = headXOrigIP.match(regexAllIp);
if(ip != null && ip.length != 0 && all_ips.indexOf(ip[0])==-1)
all_ips.unshift( ip[0] );
}
if ( all_ips.length != 0 ){ if ( all_ips.length != 0 ){
mailHops.lookup ( all_ips ) ; mailHops.lookup ( all_ips ) ;
} else { } else {

View File

@ -7,7 +7,7 @@
<em:id>postbox@mailhops.com</em:id> <em:id>postbox@mailhops.com</em:id>
<em:type>2</em:type> <em:type>2</em:type>
<em:name>MailHops</em:name> <em:name>MailHops</em:name>
<em:version>0.6.8</em:version> <em:version>0.6.9</em:version>
<em:description>MailHops maps the route an email traveled to get to you. Using GeoIP it also displays distance traveled along with the location (city, state and country) of the sender.</em:description> <em:description>MailHops maps the route an email traveled to get to you. Using GeoIP it also displays distance traveled along with the location (city, state and country) of the sender.</em:description>
<em:iconURL>chrome://mailhops/content/images/mailhops32.png</em:iconURL> <em:iconURL>chrome://mailhops/content/images/mailhops32.png</em:iconURL>
<em:homepageURL>http://mailhops.com</em:homepageURL> <em:homepageURL>http://mailhops.com</em:homepageURL>

BIN
mailhops-0.6.9-pb.xpi Normal file

Binary file not shown.