mirror of
https://github.com/MailHops/mailhops-plugin.git
synced 2025-05-17 23:00:10 -07:00
Added link to spamhaus
This commit is contained in:
parent
b7362963c5
commit
18a942c88a
@ -22,7 +22,7 @@ var mailHops =
|
|||||||
showWeather: false,
|
showWeather: false,
|
||||||
map: 'goog',
|
map: 'goog',
|
||||||
unit: 'mi',
|
unit: 'mi',
|
||||||
appVersion: 'MailHops Postbox 0.6'
|
appVersion: 'MailHops Postbox 0.6.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
mailHops.init = function()
|
mailHops.init = function()
|
||||||
@ -66,6 +66,12 @@ mailHops.init = function()
|
|||||||
}
|
}
|
||||||
, false);
|
, false);
|
||||||
|
|
||||||
|
mailHops.mailhopsDataPaneDNSBL.addEventListener("click", function () {
|
||||||
|
var ip = this.getAttribute('ip');
|
||||||
|
mailHops.launchSpamHausURL(ip);
|
||||||
|
}
|
||||||
|
, false);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mailHops.loadPref = function()
|
mailHops.loadPref = function()
|
||||||
@ -281,11 +287,21 @@ mailHops.displayResultAuth = function( header_xmailer, header_useragent, header_
|
|||||||
//X-Mailer or User-Agent
|
//X-Mailer or User-Agent
|
||||||
if(header_xmailer){
|
if(header_xmailer){
|
||||||
mailHops.mailhopsDataPaneMailer.style.backgroundImage = 'url(chrome://mailhops/content/images/email.png)';
|
mailHops.mailhopsDataPaneMailer.style.backgroundImage = 'url(chrome://mailhops/content/images/email.png)';
|
||||||
|
if(header_xmailer.indexOf('(')!=-1)
|
||||||
|
mailHops.mailhopsDataPaneMailer.setAttribute('value',header_xmailer.substring(0,header_xmailer.indexOf('(')));
|
||||||
|
else if(header_xmailer.indexOf('[')!=-1)
|
||||||
|
mailHops.mailhopsDataPaneMailer.setAttribute('value',header_xmailer.substring(0,header_xmailer.indexOf('[')));
|
||||||
|
else
|
||||||
mailHops.mailhopsDataPaneMailer.setAttribute('value',header_xmailer);
|
mailHops.mailhopsDataPaneMailer.setAttribute('value',header_xmailer);
|
||||||
mailHops.mailhopsDataPaneMailer.setAttribute('tooltiptext',header_xmailer);
|
mailHops.mailhopsDataPaneMailer.setAttribute('tooltiptext',header_xmailer);
|
||||||
mailHops.mailhopsDataPaneMailer.style.display='block';
|
mailHops.mailhopsDataPaneMailer.style.display='block';
|
||||||
} else if(header_useragent){
|
} else if(header_useragent){
|
||||||
mailHops.mailhopsDataPaneMailer.style.backgroundImage = 'url(chrome://mailhops/content/images/email.png)';
|
mailHops.mailhopsDataPaneMailer.style.backgroundImage = 'url(chrome://mailhops/content/images/email.png)';
|
||||||
|
if(header_useragent.indexOf('(')!=-1)
|
||||||
|
mailHops.mailhopsDataPaneMailer.setAttribute('value',header_useragent.substring(0,header_useragent.indexOf('(')));
|
||||||
|
else if(header_useragent.indexOf('[')!=-1)
|
||||||
|
mailHops.mailhopsDataPaneMailer.setAttribute('value',header_useragent.substring(0,header_useragent.indexOf('[')));
|
||||||
|
else
|
||||||
mailHops.mailhopsDataPaneMailer.setAttribute('value',header_useragent);
|
mailHops.mailhopsDataPaneMailer.setAttribute('value',header_useragent);
|
||||||
mailHops.mailhopsDataPaneMailer.setAttribute('tooltiptext',header_useragent);
|
mailHops.mailhopsDataPaneMailer.setAttribute('tooltiptext',header_useragent);
|
||||||
mailHops.mailhopsDataPaneMailer.style.display='block';
|
mailHops.mailhopsDataPaneMailer.style.display='block';
|
||||||
@ -384,6 +400,29 @@ mailHops.authExplainDNSBL = function(result){
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mailHops.authExplainDNSBL_server = function(result){
|
||||||
|
|
||||||
|
switch(result){
|
||||||
|
|
||||||
|
case '127.0.0.2':
|
||||||
|
case '127.0.0.3':
|
||||||
|
return 'SBL';
|
||||||
|
|
||||||
|
case '127.0.0.4':
|
||||||
|
case '127.0.0.5':
|
||||||
|
case '127.0.0.6':
|
||||||
|
case '127.0.0.7':
|
||||||
|
return 'XBL';
|
||||||
|
|
||||||
|
case '127.0.0.10':
|
||||||
|
case '127.0.0.11':
|
||||||
|
return 'PBL';
|
||||||
|
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
mailHops.displayResult = function ( header_route, response ){
|
mailHops.displayResult = function ( header_route, response ){
|
||||||
var displayText='';
|
var displayText='';
|
||||||
var distanceText='';
|
var distanceText='';
|
||||||
@ -454,11 +493,12 @@ mailHops.displayResult = function ( header_route, response ){
|
|||||||
|
|
||||||
//auth & dnsbl
|
//auth & dnsbl
|
||||||
if(!response.route[i].private && response.route[i].dnsbl && response.route[i].dnsbl.listed){
|
if(!response.route[i].private && response.route[i].dnsbl && response.route[i].dnsbl.listed){
|
||||||
mailHops.mailhopsDataPaneDNSBL.setAttribute('value','Blacklisted');
|
mailHops.mailhopsDataPaneDNSBL.setAttribute('value','Blacklisted '+mailHops.authExplainDNSBL_server(response.route[i].dnsbl.record));
|
||||||
|
mailHops.mailhopsDataPaneDNSBL.setAttribute('ip',response.route[i].ip);
|
||||||
if(response.route[i].dnsbl.record)
|
if(response.route[i].dnsbl.record)
|
||||||
mailHops.mailhopsDataPaneDNSBL.setAttribute('tooltiptext',mailHops.authExplainDNSBL(response.route[i].dnsbl.record));
|
mailHops.mailhopsDataPaneDNSBL.setAttribute('tooltiptext','Click for more details.\n'+mailHops.authExplainDNSBL(response.route[i].dnsbl.record));
|
||||||
else
|
else
|
||||||
mailHops.mailhopsDataPaneDNSBL.setAttribute('tooltiptext','');
|
mailHops.mailhopsDataPaneDNSBL.setAttribute('tooltiptext','Click for more details.');
|
||||||
mailHops.mailhopsDataPaneDNSBL.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/bomb.png)';
|
mailHops.mailhopsDataPaneDNSBL.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/bomb.png)';
|
||||||
mailHops.mailhopsDataPaneDNSBL.style.display = 'block';
|
mailHops.mailhopsDataPaneDNSBL.style.display = 'block';
|
||||||
}
|
}
|
||||||
@ -650,6 +690,11 @@ mailHops.addCommas = function(nStr){
|
|||||||
return x1 + x2;
|
return x1 + x2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mailHops.launchSpamHausURL = function(ip){
|
||||||
|
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||||
|
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||||
|
messenger.launchExternalURL('http://www.spamhaus.org/query/bl?ip='+ip);
|
||||||
|
};
|
||||||
mailHops.launchMap = function(route){
|
mailHops.launchMap = function(route){
|
||||||
//launch mailhops api map
|
//launch mailhops api map
|
||||||
var lookupURL='http://api.mailhops.com/v1/map/?pb&app='+mailHops.appVersion+'&m='+mailHops.map+'&u='+mailHops.unit+'&r='+String(route);
|
var lookupURL='http://api.mailhops.com/v1/map/?pb&app='+mailHops.appVersion+'&m='+mailHops.map+'&u='+mailHops.unit+'&r='+String(route);
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
<label id="mailhopsDataPaneMailer" class="dataPaneAddressitem auth-item" value="" tooltiptext="X-Mailer"></label>
|
<label id="mailhopsDataPaneMailer" class="dataPaneAddressitem auth-item" value="" tooltiptext="X-Mailer"></label>
|
||||||
<label id="mailhopsDataPaneSPF" class="dataPaneAddressitem auth-item" value="" tooltiptext="SPF"></label>
|
<label id="mailhopsDataPaneSPF" class="dataPaneAddressitem auth-item" value="" tooltiptext="SPF"></label>
|
||||||
<label id="mailhopsDataPaneDKIM" class="dataPaneAddressitem auth-item" value="" tooltiptext="DKIM"></label>
|
<label id="mailhopsDataPaneDKIM" class="dataPaneAddressitem auth-item" value="" tooltiptext="DKIM"></label>
|
||||||
<label id="mailhopsDataPaneDNSBL" class="dataPaneAddressitem auth-item" value="" tooltiptext="DNSBL"></label>
|
<label id="mailhopsDataPaneDNSBL" class="text-link dataPaneAddressitem auth-item" value="" tooltiptext="DNSBL"></label>
|
||||||
</vbox>
|
</vbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
@ -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</em:version>
|
<em:version>0.6.1</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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user