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:
parent
836efb18b2
commit
184f573083
@ -24,7 +24,7 @@ var mailHops =
|
||||
showWeather: false,
|
||||
map: 'goog',
|
||||
unit: 'mi',
|
||||
appVersion: 'MailHops Postbox 0.6.8'
|
||||
appVersion: 'MailHops Postbox 0.6.9'
|
||||
}
|
||||
|
||||
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 all_ips = new Array();
|
||||
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
|
||||
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 ){
|
||||
mailHops.lookup ( all_ips ) ;
|
||||
} else {
|
||||
|
@ -7,7 +7,7 @@
|
||||
<em:id>postbox@mailhops.com</em:id>
|
||||
<em:type>2</em:type>
|
||||
<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:iconURL>chrome://mailhops/content/images/mailhops32.png</em:iconURL>
|
||||
<em:homepageURL>http://mailhops.com</em:homepageURL>
|
||||
|
BIN
mailhops-0.6.9-pb.xpi
Normal file
BIN
mailhops-0.6.9-pb.xpi
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user