mirror of
https://github.com/MailHops/mailhops-plugin.git
synced 2025-05-17 14:50:08 -07:00
Removed old js and css
Updated locales
This commit is contained in:
parent
06be6f05e7
commit
c34f89f58d
@ -10,9 +10,7 @@ locale mailhops ru jar:chrome/mailhops.jar!/locale/ru/
|
|||||||
locale mailhops zh-CN jar:chrome/mailhops.jar!/locale/zh-CN/
|
locale mailhops zh-CN jar:chrome/mailhops.jar!/locale/zh-CN/
|
||||||
|
|
||||||
# Postbox
|
# Postbox
|
||||||
# overlay chrome://messenger/content/msgHdrViewOverlay.xul chrome://mailhops/content/pb-overlay.xul application=postbox@postbox-inc.com
|
|
||||||
overlay chrome://messenger/content/mailWindowOverlay.xul chrome://mailhops/content/msgNotificationBar.xul application=postbox@postbox-inc.com
|
overlay chrome://messenger/content/mailWindowOverlay.xul chrome://mailhops/content/msgNotificationBar.xul application=postbox@postbox-inc.com
|
||||||
|
|
||||||
# Thunberbird
|
# Thunberbird
|
||||||
# overlay chrome://messenger/content/msgHdrViewOverlay.xul chrome://mailhops/content/tb-overlay.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6}
|
|
||||||
overlay chrome://messenger/content/mailWindowOverlay.xul chrome://mailhops/content/msgNotificationBar.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6}
|
overlay chrome://messenger/content/mailWindowOverlay.xul chrome://mailhops/content/msgNotificationBar.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB |
@ -9,7 +9,7 @@ var mailHops =
|
|||||||
msgURI: null,
|
msgURI: null,
|
||||||
isLoaded: false,
|
isLoaded: false,
|
||||||
options: {
|
options: {
|
||||||
'version':'MailHops Plugin 2.0.0',
|
'version':'MailHops Plugin 3.0.0',
|
||||||
'lan':'en',
|
'lan':'en',
|
||||||
'unit':'mi',
|
'unit':'mi',
|
||||||
'api_http':'https://',
|
'api_http':'https://',
|
||||||
|
@ -10,12 +10,14 @@ var mailHopsDisplay =
|
|||||||
mailhopsDataPaneDNSBL: null,
|
mailhopsDataPaneDNSBL: null,
|
||||||
mailhopsResultWeather: null,
|
mailhopsResultWeather: null,
|
||||||
mailhopsUnsubscribe: null,
|
mailhopsUnsubscribe: null,
|
||||||
|
mailhopsNoficationBox: null,
|
||||||
options: null,
|
options: null,
|
||||||
|
|
||||||
init: function(options){
|
init: function(options){
|
||||||
|
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
|
||||||
|
this.mailhopsNoficationBox = document.getElementById("mailhopsNoficationBox");
|
||||||
this.container = document.getElementById("mailhopsBox");
|
this.container = document.getElementById("mailhopsBox");
|
||||||
this.resultBox = document.getElementById("mailhopsResult");
|
this.resultBox = document.getElementById("mailhopsResult");
|
||||||
this.resultText = document.getElementById("mailhopsResultText");
|
this.resultText = document.getElementById("mailhopsResultText");
|
||||||
@ -184,10 +186,13 @@ var mailHopsDisplay =
|
|||||||
this.resultDetails.removeChild(this.resultDetails.firstChild);
|
this.resultDetails.removeChild(this.resultDetails.firstChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(no_ips)
|
if(no_ips){
|
||||||
|
this.resultText.style.backgroundImage = "url('chrome://mailhops/content/images/local.png')";
|
||||||
this.resultText.value = ' Looks like a local message';
|
this.resultText.value = ' Looks like a local message';
|
||||||
else
|
} else {
|
||||||
|
this.resultText.style.backgroundImage = "url('chrome://mailhops/content/images/refresh.png')";
|
||||||
this.resultText.value = ' Looking Up Route...';
|
this.resultText.value = ' Looking Up Route...';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
route: function ( header_route, message, response, meta, lookup_url ){
|
route: function ( header_route, message, response, meta, lookup_url ){
|
||||||
@ -296,7 +301,7 @@ var mailHopsDisplay =
|
|||||||
//set weather of sender
|
//set weather of sender
|
||||||
if(weatherRoute){
|
if(weatherRoute){
|
||||||
this.mailhopsResultWeather.style.display = 'block';
|
this.mailhopsResultWeather.style.display = 'block';
|
||||||
this.mailhopsResultWeather.setAttribute('tooltiptext','Weather');
|
this.mailhopsResultWeather.setAttribute('tooltiptext','Weather in '+weatherRoute.city+' '+weatherRoute.state);
|
||||||
this.mailhopsResultWeather.value = weatherRoute.weather.summary+' '+Math.round(weatherRoute.weather.temp)+'\u00B0';
|
this.mailhopsResultWeather.value = weatherRoute.weather.summary+' '+Math.round(weatherRoute.weather.temp)+'\u00B0';
|
||||||
this.mailhopsResultWeather.style.backgroundImage = 'url('+mailHopsUtils.getWeatherIcon(weatherRoute.weather.icon)+')';
|
this.mailhopsResultWeather.style.backgroundImage = 'url('+mailHopsUtils.getWeatherIcon(weatherRoute.weather.icon)+')';
|
||||||
if(weatherRoute.coords)
|
if(weatherRoute.coords)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE overlay SYSTEM "chrome://mailhops/locale/strings.dtd" >
|
<!DOCTYPE overlay SYSTEM "chrome://mailhops/locale/strings.dtd" >
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://mailhops/skin/mh-notification-styles.css" type="text/css"?>
|
<?xml-stylesheet href="chrome://mailhops/skin/msgNotificationBar.css" type="text/css"?>
|
||||||
|
|
||||||
<overlay id="mailhopsNotificationOverlay"
|
<overlay id="mailhopsNotificationOverlay"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
@ -1,504 +0,0 @@
|
|||||||
var mailHopsDisplay =
|
|
||||||
{
|
|
||||||
resultTextDataPane: null,
|
|
||||||
resultTextDataPane2: null,
|
|
||||||
resultTextDataPane3: null,
|
|
||||||
resultContainerDataPane: null,
|
|
||||||
resultContainerDetails: null,
|
|
||||||
resultDetails: null,
|
|
||||||
resultMapLink: null,
|
|
||||||
resultSlackLink: null,
|
|
||||||
mailhopsDataPaneSPF: null,
|
|
||||||
mailhopsDataPaneDKIM: null,
|
|
||||||
mailhopsDataPaneMailer: null,
|
|
||||||
mailhopsDataPaneDNSBL: null,
|
|
||||||
mailhopsListContainer: null,
|
|
||||||
mailhopsAuthContainer: null,
|
|
||||||
resultListDataPane: null,
|
|
||||||
resultMeta: null,
|
|
||||||
options: null,
|
|
||||||
|
|
||||||
init: function(options){
|
|
||||||
|
|
||||||
this.options = options;
|
|
||||||
|
|
||||||
this.resultContainerDataPane = document.getElementById ( "mailhopsDataPane");
|
|
||||||
this.resultTextDataPane = document.getElementById ( "mailhopsDataPaneText");
|
|
||||||
this.resultTextDataPane2 = document.getElementById ( "mailhopsDataPaneText2");
|
|
||||||
this.resultTextDataPane3 = document.getElementById ( "mailhopsDataPaneText3");
|
|
||||||
|
|
||||||
this.resultContainerDetails = document.getElementById ( "mailhopsDetailsContainer");
|
|
||||||
this.resultDetails = document.getElementById ( "mailhopsDataPaneDetails");
|
|
||||||
this.resultMeta = document.getElementById ( "mailhopsDataPaneMeta");
|
|
||||||
this.resultMapLink = document.getElementById ( "mailhopsDataPaneMapLink");
|
|
||||||
this.resultSlackLink = document.getElementById ( "mailhopsDataPaneSlackLink");
|
|
||||||
|
|
||||||
//auth
|
|
||||||
this.mailhopsAuthContainer = document.getElementById ( "dataPaneMailHopsAuthContainer");
|
|
||||||
this.mailhopsDataPaneSPF = document.getElementById ( "mailhopsDataPaneSPF");
|
|
||||||
this.mailhopsDataPaneDKIM = document.getElementById ( "mailhopsDataPaneDKIM");
|
|
||||||
this.mailhopsDataPaneMailer = document.getElementById ( "mailhopsDataPaneMailer");
|
|
||||||
this.mailhopsDataPaneDNSBL = document.getElementById ( "mailhopsDataPaneDNSBL");
|
|
||||||
//list
|
|
||||||
this.mailhopsListContainer = document.getElementById ( "dataPaneMailHopsListContainer");
|
|
||||||
|
|
||||||
this.resultListDataPane = document.getElementById ( "mailhopsListDataPane");
|
|
||||||
|
|
||||||
if(this.options.show_meta)
|
|
||||||
document.getElementById('dataPaneMailHopsMetaContainer').style.display='';
|
|
||||||
else
|
|
||||||
document.getElementById('dataPaneMailHopsMetaContainer').style.display='none';
|
|
||||||
|
|
||||||
//event listner for route click to launch map
|
|
||||||
this.resultMapLink.addEventListener("click", function () {
|
|
||||||
if(this.hasAttribute("data-route"))
|
|
||||||
mailHopsUtils.launchMap( String(this.getAttribute("data-route")), options );
|
|
||||||
});
|
|
||||||
|
|
||||||
this.mailhopsDataPaneDNSBL.addEventListener("click", function () {
|
|
||||||
if(this.hasAttribute('data-ip'))
|
|
||||||
mailHopsUtils.launchSpamHausURL(this.getAttribute('data-ip'));
|
|
||||||
});
|
|
||||||
|
|
||||||
this.resultSlackLink.addEventListener("click", function () {
|
|
||||||
mailHopsUtils.postToWebhook( String(this.getAttribute("data-api_url")), options );
|
|
||||||
});
|
|
||||||
|
|
||||||
//display auth
|
|
||||||
if(!this.options.show_auth)
|
|
||||||
this.displayResultAuth(headXMailer,headUserAgent,headXMimeOLE,headAuth,headReceivedSPF);
|
|
||||||
else
|
|
||||||
this.mailhopsAuthContainer.style.display='none';
|
|
||||||
|
|
||||||
}, //end init
|
|
||||||
|
|
||||||
lists: function( header_unsubscribe ){
|
|
||||||
while(this.resultListDataPane.firstChild) {
|
|
||||||
this.resultListDataPane.removeChild(this.resultListDataPane.firstChild);
|
|
||||||
}
|
|
||||||
this.mailhopsListContainer.style.display='';
|
|
||||||
if(header_unsubscribe){
|
|
||||||
var listArr=header_unsubscribe.split(',');
|
|
||||||
var href='';
|
|
||||||
if(listArr.length){
|
|
||||||
for(var h=0;h<listArr.length;h++){
|
|
||||||
href = listArr[h].replace('<','').replace('>','');
|
|
||||||
var label = document.createElement('label');
|
|
||||||
|
|
||||||
label.setAttribute('class','text-link dataPaneURLitem');
|
|
||||||
|
|
||||||
if(href.indexOf('mailto:')!=-1){
|
|
||||||
label.setAttribute('value','Unsubscribe via Email');
|
|
||||||
if(href.toLowerCase().indexOf('subject=')==-1){
|
|
||||||
if(href.indexOf('?')==-1)
|
|
||||||
href+='?subject=Unsubscribe';
|
|
||||||
else
|
|
||||||
href+='&subject=Unsubscribe';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
label.setAttribute('value','Unsubscribe via Web');
|
|
||||||
}
|
|
||||||
label.setAttribute('tooltiptext',href);
|
|
||||||
label.setAttribute('href',href);
|
|
||||||
this.resultListDataPane.appendChild(label);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
auth: function( header_xmailer, header_useragent, header_xmimeole, header_auth, header_spf ){
|
|
||||||
this.mailhopsAuthContainer.style.display='';
|
|
||||||
//SPF
|
|
||||||
if(header_spf){
|
|
||||||
header_spf=header_spf.replace(/^\s+/,"");
|
|
||||||
var headerSPFArr=header_spf.split(' ');
|
|
||||||
this.mailhopsDataPaneSPF.setAttribute('value','SPF: '+headerSPFArr[0]);
|
|
||||||
this.mailhopsDataPaneSPF.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/'+headerSPFArr[0]+'.png)';
|
|
||||||
this.mailhopsDataPaneSPF.setAttribute('tooltiptext',header_spf+'\n'+mailHopsUtils.spf(headerSPFArr[0]));
|
|
||||||
this.mailhopsDataPaneSPF.style.display='block';
|
|
||||||
} else {
|
|
||||||
this.mailhopsDataPaneSPF.style.display='none';
|
|
||||||
}
|
|
||||||
//Authentication-Results
|
|
||||||
//http://tools.ietf.org/html/rfc5451
|
|
||||||
if(header_auth){
|
|
||||||
var headerAuthArr=header_auth.split(';');
|
|
||||||
var dkim_result;
|
|
||||||
var spf_result;
|
|
||||||
for(var h=0;h<headerAuthArr.length;h++){
|
|
||||||
if(headerAuthArr[h].indexOf('dkim=')!=-1){
|
|
||||||
dkim_result = headerAuthArr[h];
|
|
||||||
if(header_spf)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(!header_spf && headerAuthArr[h].indexOf('spf=')!=-1){
|
|
||||||
spf_result = headerAuthArr[h];
|
|
||||||
if(dkim_result)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.options.show_dkim && dkim_result){
|
|
||||||
dkim_result=dkim_result.replace(/^\s+/,"");
|
|
||||||
var dkimArr=dkim_result.split(' ');
|
|
||||||
this.mailhopsDataPaneDKIM.setAttribute('value','DKIM: '+dkimArr[0].replace('dkim=',''));
|
|
||||||
this.mailhopsDataPaneDKIM.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/'+dkimArr[0].replace('dkim=','')+'.png)';
|
|
||||||
this.mailhopsDataPaneDKIM.setAttribute('tooltiptext',dkim_result+'\n'+mailHopsUtils.dkim(dkimArr[0].replace('dkim=','')));
|
|
||||||
this.mailhopsDataPaneDKIM.style.display='block';
|
|
||||||
} else {
|
|
||||||
this.mailhopsDataPaneDKIM.style.display='none';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.options.show_spf && spf_result){
|
|
||||||
spf_result=spf_result.replace(/^\s+/,"");
|
|
||||||
var spfArr=spf_result.split(' ');
|
|
||||||
this.mailhopsDataPaneSPF.setAttribute('value','SPF: '+spfArr[0].replace('spf=',''));
|
|
||||||
this.mailhopsDataPaneSPF.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/'+spfArr[0].replace('spf=','')+'.png)';
|
|
||||||
this.mailhopsDataPaneSPF.setAttribute('tooltiptext',spf_result+'\n'+mailHopsUtils.spf(spfArr[0].replace('spf=','')));
|
|
||||||
this.mailhopsDataPaneSPF.style.display='block';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.mailhopsDataPaneDKIM.style.display='none';
|
|
||||||
}
|
|
||||||
//X-Mailer, User-Agent or X-MimeOLE
|
|
||||||
if(header_xmailer){
|
|
||||||
this.mailhopsDataPaneMailer.style.backgroundImage = 'url(chrome://mailhops/content/images/email.png)';
|
|
||||||
if(header_xmailer.indexOf('(')!=-1)
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_xmailer.substring(0,header_xmailer.indexOf('(')));
|
|
||||||
else if(header_xmailer.indexOf('[')!=-1)
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_xmailer.substring(0,header_xmailer.indexOf('[')));
|
|
||||||
else
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_xmailer);
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('tooltiptext',header_xmailer);
|
|
||||||
this.mailhopsDataPaneMailer.style.display='block';
|
|
||||||
} else if(header_useragent){
|
|
||||||
this.mailhopsDataPaneMailer.style.backgroundImage = 'url(chrome://mailhops/content/images/email.png)';
|
|
||||||
if(header_useragent.indexOf('(')!=-1)
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_useragent.substring(0,header_useragent.indexOf('(')));
|
|
||||||
else if(header_useragent.indexOf('[')!=-1)
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_useragent.substring(0,header_useragent.indexOf('[')));
|
|
||||||
else
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_useragent);
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('tooltiptext',header_useragent);
|
|
||||||
this.mailhopsDataPaneMailer.style.display='block';
|
|
||||||
} else if(header_xmimeole){
|
|
||||||
this.mailhopsDataPaneMailer.style.backgroundImage = 'url(chrome://mailhops/content/images/email.png)';
|
|
||||||
|
|
||||||
if(header_xmimeole.indexOf('(')!=-1)
|
|
||||||
header_xmimeole = header_xmimeole.substring(0,header_xmimeole.indexOf('('));
|
|
||||||
else if(header_xmimeole.indexOf('[')!=-1)
|
|
||||||
header_xmimeole = header_xmimeole.substring(0,header_xmimeole.indexOf('['));
|
|
||||||
|
|
||||||
if(header_xmimeole.indexOf('Produced By ')!=-1)
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_xmimeole.replace('Produced By ',''));
|
|
||||||
else
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_xmimeole);
|
|
||||||
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('tooltiptext',header_xmimeole);
|
|
||||||
this.mailhopsDataPaneMailer.style.display='block';
|
|
||||||
} else {
|
|
||||||
this.mailhopsDataPaneMailer.style.display='none';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
error: function(status,data){
|
|
||||||
this.resultMapLink.removeAttribute("route");
|
|
||||||
this.resultTextDataPane.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/error.png)';
|
|
||||||
|
|
||||||
if(data && data.error){
|
|
||||||
this.resultTextDataPane.value = status+': '+data.error.message;
|
|
||||||
this.resultTextDataPane.setAttribute('tooltiptext',data.error.message);
|
|
||||||
} else {
|
|
||||||
this.resultTextDataPane.value = ' Service Unavailable.';
|
|
||||||
this.resultTextDataPane.setAttribute('tooltiptext',' Could not connect to MailHops API.');
|
|
||||||
}
|
|
||||||
this.resultTextDataPane2.style.display = 'none';
|
|
||||||
this.resultTextDataPane2.value = '';
|
|
||||||
this.resultTextDataPane2.style.backgroundImage = '';
|
|
||||||
this.resultTextDataPane2.setAttribute('tooltiptext','');
|
|
||||||
|
|
||||||
this.resultTextDataPane3.style.display = 'none';
|
|
||||||
this.resultTextDataPane3.value = '';
|
|
||||||
},
|
|
||||||
|
|
||||||
clear: function(no_ips){
|
|
||||||
this.resultTextDataPane2.style.display = 'none';
|
|
||||||
this.resultContainerDetails.style.display = 'none';
|
|
||||||
this.resultMapLink.style.display = 'none';
|
|
||||||
this.mailhopsDataPaneDNSBL.style.display = 'none';
|
|
||||||
|
|
||||||
if(no_ips){
|
|
||||||
this.resultTextDataPane.style.backgroundImage = 'url(chrome://mailhops/content/images/help.png)';
|
|
||||||
this.resultTextDataPane.value = ' No IPs';
|
|
||||||
this.resultTextDataPane.setAttribute('tooltiptext','There were no received headers found');
|
|
||||||
} else {
|
|
||||||
this.resultTextDataPane.style.backgroundImage = 'url(chrome://mailhops/content/images/loader.gif)';
|
|
||||||
this.resultTextDataPane.value = ' Looking Up Route';
|
|
||||||
this.resultTextDataPane.setAttribute('tooltiptext','Looking Up Route');
|
|
||||||
}
|
|
||||||
|
|
||||||
this.resultTextDataPane2.value = '';
|
|
||||||
this.resultTextDataPane2.style.backgroundImage = '';
|
|
||||||
this.resultTextDataPane2.setAttribute('tooltiptext','');
|
|
||||||
|
|
||||||
this.resultTextDataPane3.style.display = 'none';
|
|
||||||
this.resultTextDataPane3.value = '';
|
|
||||||
|
|
||||||
//remove child details
|
|
||||||
while(this.resultDetails.firstChild) {
|
|
||||||
this.resultDetails.removeChild(this.resultDetails.firstChild);
|
|
||||||
}
|
|
||||||
if(this.options.show_meta){
|
|
||||||
while(this.resultMeta.firstChild) {
|
|
||||||
this.resultMeta.removeChild(this.resultMeta.firstChild);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
route: function(header_route, message, response, meta, lookup_url){
|
|
||||||
|
|
||||||
var displayText=''
|
|
||||||
, distanceText=''
|
|
||||||
, image='chrome://mailhops/content/images/local.png'
|
|
||||||
, secureToolTipText=false
|
|
||||||
, weather=null
|
|
||||||
, first=null;
|
|
||||||
|
|
||||||
//remove child details
|
|
||||||
while(this.resultDetails.firstChild) {
|
|
||||||
this.resultDetails.removeChild(this.resultDetails.firstChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
//append meta
|
|
||||||
try {
|
|
||||||
if(this.options.show_meta){
|
|
||||||
for(var i in meta){
|
|
||||||
var mlabel = document.createElement('label');
|
|
||||||
if(typeof meta[i] == 'object'){
|
|
||||||
mlabel.setAttribute('value',i+': ');
|
|
||||||
this.resultMeta.appendChild(mlabel);
|
|
||||||
for(var ii in meta[i]){
|
|
||||||
var mlabel = document.createElement('label');
|
|
||||||
if(ii=='reset'){
|
|
||||||
if(parseInt(meta[i][ii])/60 < 60)
|
|
||||||
mlabel.setAttribute('value',' '+ii+': '+Math.round(parseInt(meta[i][ii])/60).toString()+' min.');
|
|
||||||
else
|
|
||||||
mlabel.setAttribute('value',' '+ii+': '+Math.round(parseInt(meta[i][ii])/60/60).toString()+' hr.');
|
|
||||||
} else {
|
|
||||||
mlabel.setAttribute('value',' '+ii+': '+meta[i][ii]);
|
|
||||||
}
|
|
||||||
this.resultMeta.appendChild(mlabel);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mlabel.setAttribute('value',i+': '+meta[i]);
|
|
||||||
this.resultMeta.appendChild(mlabel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var mlabel = document.createElement('label');
|
|
||||||
mlabel.setAttribute('value','api url');
|
|
||||||
mlabel.setAttribute('class','text-link');
|
|
||||||
mlabel.setAttribute('href',lookup_url);
|
|
||||||
this.resultMeta.appendChild(mlabel);
|
|
||||||
}
|
|
||||||
} catch(e){
|
|
||||||
// parseInt error?
|
|
||||||
}
|
|
||||||
|
|
||||||
if(response && response.route && response.route.length){
|
|
||||||
|
|
||||||
if(this.options.client_location){
|
|
||||||
var client_location = JSON.parse(this.options.client_location);
|
|
||||||
//get distance from last route to client_location and add to response.distance.miles or kilometers
|
|
||||||
if(!response.route[response.route.length-1]['private']){
|
|
||||||
if(this.options.unit=='km')
|
|
||||||
response.distance.kilometers += mailHopsUtils.getDistance(response.route[response.route.length-1],client_location.route[0],this.options.unit);
|
|
||||||
else
|
|
||||||
response.distance.miles += mailHopsUtils.getDistance(response.route[response.route.length-1],client_location.route[0],this.options.unit);
|
|
||||||
}
|
|
||||||
//push client location to the end of the route
|
|
||||||
response.route.push(client_location.route[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(var i=0; i<response.route.length;i++){
|
|
||||||
//get the first hop location
|
|
||||||
if(!first && !response.route[i].private && !response.route[i].client){
|
|
||||||
first = response.route[i];
|
|
||||||
if(!!response.route[i].countryCode)
|
|
||||||
image='chrome://mailhops/content/images/flags/'+response.route[i].countryCode.toLowerCase()+'.png';
|
|
||||||
}
|
|
||||||
|
|
||||||
var label = document.createElement('label');
|
|
||||||
|
|
||||||
if(response.route[i].countryCode)
|
|
||||||
label.style.backgroundImage = 'url(chrome://mailhops/content/images/flags/'+response.route[i].countryCode.toLowerCase()+'.png)';
|
|
||||||
else
|
|
||||||
label.style.backgroundImage = 'url(chrome://mailhops/content/images/local.png)';
|
|
||||||
label.setAttribute('class','dataPaneAddressitem mailhopsDetail');
|
|
||||||
|
|
||||||
if(response.route[i].city && response.route[i].state){
|
|
||||||
label.setAttribute('value','Hop #'+(i+1)+' '+response.route[i].city+', '+response.route[i].state);
|
|
||||||
label.setAttribute('data-ip',response.route[i].ip);
|
|
||||||
label.addEventListener("click", function (e) {
|
|
||||||
mailHopsUtils.launchWhoIs(this.getAttribute('data-ip'));
|
|
||||||
}, false);
|
|
||||||
}
|
|
||||||
else if(response.route[i].city){
|
|
||||||
label.setAttribute('value','Hop #'+(i+1)+' '+response.route[i].city+', '+response.route[i].countryCode);
|
|
||||||
label.setAttribute('data-ip',response.route[i].ip);
|
|
||||||
label.addEventListener("click", function () {
|
|
||||||
mailHopsUtils.launchWhoIs(this.getAttribute('data-ip'));
|
|
||||||
}, false);
|
|
||||||
}
|
|
||||||
else if(response.route[i].countryName){
|
|
||||||
label.setAttribute('value','Hop #'+(i+1)+' '+response.route[i].countryName);
|
|
||||||
label.setAttribute('data-ip',response.route[i].ip);
|
|
||||||
label.addEventListener("click", function () {
|
|
||||||
mailHopsUtils.launchWhoIs(this.getAttribute('data-ip'));
|
|
||||||
}, false);
|
|
||||||
} else {
|
|
||||||
label.setAttribute('value','Hop #'+(i+1)+' Private');
|
|
||||||
}
|
|
||||||
|
|
||||||
//build tooltip
|
|
||||||
var tiptext = response.route[i].ip;
|
|
||||||
|
|
||||||
if(!this.options.show_host){
|
|
||||||
if(response.route[i].host)
|
|
||||||
tiptext+=' '+response.route[i].host;
|
|
||||||
if(response.route[i].whois && response.route[i].whois.descr)
|
|
||||||
tiptext+=' '+response.route[i].whois.descr;
|
|
||||||
if(response.route[i].whois && response.route[i].whois.netname)
|
|
||||||
tiptext+=' '+response.route[i].whois.netname;
|
|
||||||
}
|
|
||||||
|
|
||||||
label.setAttribute('tooltiptext','Click for whois '+tiptext);
|
|
||||||
|
|
||||||
//append details
|
|
||||||
this.resultDetails.appendChild(label);
|
|
||||||
|
|
||||||
//append weather
|
|
||||||
if(!weather && response.route[i].weather){
|
|
||||||
weather = response.route[i].weather;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.options.show_secure){
|
|
||||||
//reset the tooltip
|
|
||||||
secureToolTipText=mailHopsUtils.getSecureTrans(response.route[i].ip, message);
|
|
||||||
//check for secure transmission
|
|
||||||
if(secureToolTipText){
|
|
||||||
var secure = document.createElement('label');
|
|
||||||
secure.setAttribute('class','dataPaneAddressitem mailhopsSecure');
|
|
||||||
secure.setAttribute('value','secured '+secureToolTipText);
|
|
||||||
this.resultDetails.appendChild(secure);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// append host
|
|
||||||
if(this.options.show_host && response.route[i].host){
|
|
||||||
var host = document.createElement('label');
|
|
||||||
host.setAttribute('value',response.route[i].host);
|
|
||||||
if(secureToolTipText)
|
|
||||||
host.setAttribute('class','dataPaneAddressitem mailhopsSecureHost');
|
|
||||||
else
|
|
||||||
host.setAttribute('class','dataPaneAddressitem mailhopsHost');
|
|
||||||
this.resultDetails.appendChild(host);
|
|
||||||
}
|
|
||||||
|
|
||||||
// auth & dnsbl
|
|
||||||
if(!response.route[i].private && response.route[i].dnsbl && response.route[i].dnsbl.listed){
|
|
||||||
this.mailhopsDataPaneDNSBL.setAttribute('value','Blacklisted '+mailHopsUtils.dnsbl(response.route[i].dnsbl.record,true));
|
|
||||||
this.mailhopsDataPaneDNSBL.setAttribute('data-ip',response.route[i].ip);
|
|
||||||
if(response.route[i].dnsbl.record)
|
|
||||||
this.mailhopsDataPaneDNSBL.setAttribute('tooltiptext','Click for more details.\n'+mailHopsUtils.dnsbl(response.route[i].dnsbl.record));
|
|
||||||
else
|
|
||||||
this.mailhopsDataPaneDNSBL.setAttribute('tooltiptext','Click for more details.');
|
|
||||||
this.mailhopsDataPaneDNSBL.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/bomb.png)';
|
|
||||||
this.mailhopsDataPaneDNSBL.style.display = 'block';
|
|
||||||
}
|
|
||||||
|
|
||||||
// if(response.route[i].ip.indexOf(':') !== -1){
|
|
||||||
// var ipv6 = document.createElement('label');
|
|
||||||
// ipv6.setAttribute('class','dataPaneAddressitem mailhopsipv6');
|
|
||||||
// ipv6.setAttribute('value','IPV6');
|
|
||||||
// this.resultDetails.appendChild(ipv6);
|
|
||||||
// }
|
|
||||||
|
|
||||||
if(response.route[i].w3w){
|
|
||||||
var w3w = document.createElement('label');
|
|
||||||
w3w.setAttribute('data-w3w',response.route[i].w3w.url);
|
|
||||||
w3w.setAttribute('class','dataPaneAddressitem mailhopsW3w');
|
|
||||||
w3w.setAttribute('value',response.route[i].w3w.words.join('.'));
|
|
||||||
w3w.addEventListener("click", function () {
|
|
||||||
mailHopsUtils.launchExternalURL(this.getAttribute('data-w3w'));
|
|
||||||
});
|
|
||||||
this.resultDetails.appendChild(w3w);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(image.indexOf('local')!=-1) {
|
|
||||||
displayText = ' Local message.';
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if(!!first){
|
|
||||||
if(!!first.city && !!first.state)
|
|
||||||
displayText = first.city+', '+first.state;
|
|
||||||
else if(!!first.city)
|
|
||||||
displayText = first.city+', '+first.countryCode;
|
|
||||||
else if(!!first.countryName)
|
|
||||||
displayText = first.countryName;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(response.distance){
|
|
||||||
if(this.options.unit=='km' && response.distance.kilometers > 0)
|
|
||||||
distanceText = mailHopsUtils.addCommas(Math.round(response.distance.kilometers))+' km traveled';
|
|
||||||
else if(response.distance.miles > 0)
|
|
||||||
distanceText = mailHopsUtils.addCommas(Math.round(response.distance.miles))+' mi traveled';
|
|
||||||
}
|
|
||||||
else if(displayText=='')
|
|
||||||
displayText = ' Local message.';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(message.time != null){
|
|
||||||
message.time = message.time/1000;
|
|
||||||
if(message.time < 60)
|
|
||||||
distanceText += ' in '+message.time+' sec.';
|
|
||||||
else if(message.time < 3600) //something is wrong if it takes this long
|
|
||||||
distanceText += ' in '+Math.round(message.time/60)+' min.';
|
|
||||||
else //something is wrong if it takes this long
|
|
||||||
distanceText += ' in '+Math.round(message.time/60/60)+' hrs.';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(header_route){
|
|
||||||
this.resultMapLink.setAttribute("data-route", header_route);
|
|
||||||
this.resultSlackLink.setAttribute("data-api_url", lookup_url.replace('lookup','map'));
|
|
||||||
} else {
|
|
||||||
this.resultMapLink.removeAttribute("data-route");
|
|
||||||
this.resultSlackLink.removeAttribute("data-api_url");
|
|
||||||
}
|
|
||||||
|
|
||||||
this.resultTextDataPane.style.backgroundImage = 'url('+image+')';
|
|
||||||
this.resultTextDataPane.value = displayText;
|
|
||||||
|
|
||||||
if(distanceText){
|
|
||||||
this.resultTextDataPane2.style.display = 'block';
|
|
||||||
this.resultTextDataPane2.value = ' ( '+distanceText+' )';
|
|
||||||
} else {
|
|
||||||
this.resultTextDataPane2.style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
//set weather of sender
|
|
||||||
if(weather){
|
|
||||||
this.resultTextDataPane3.style.display = 'block';
|
|
||||||
this.resultTextDataPane3.setAttribute('tooltiptext',new Date(weather.time*1000));
|
|
||||||
this.resultTextDataPane3.value = weather.summary+' '+Math.round(weather.temp)+'\u00B0';
|
|
||||||
this.resultTextDataPane3.style.backgroundImage = 'url('+mailHopsUtils.getWeatherIcon(weather.icon)+')';
|
|
||||||
}
|
|
||||||
|
|
||||||
//show the detail link
|
|
||||||
this.resultMapLink.style.display = 'block';
|
|
||||||
this.resultContainerDetails.style.display = 'block';
|
|
||||||
|
|
||||||
} //end route
|
|
||||||
};
|
|
@ -1,82 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE overlay SYSTEM "chrome://mailhops/locale/strings.dtd" >
|
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://mailhops/skin/pb-styles.css" type="text/css"?>
|
|
||||||
|
|
||||||
<overlay id="mailhopsOverlay"
|
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/utils.js"/>
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/pb-overlay.js"/>
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/mailhops.js"/>
|
|
||||||
|
|
||||||
<vbox id="dataPane2">
|
|
||||||
<vbox id="dataPaneMailHopsContainer" class="dataPaneBox">
|
|
||||||
<hbox flex="1" pack="start" align="center">
|
|
||||||
<label class="dataPaneHeader" crop="right" value="&mailhops_header_route_label;"></label>
|
|
||||||
<separator class="dataPaneBoxSeparator" flex="1"></separator>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
<hbox class="mailHopsLinkContainer">
|
|
||||||
<vbox><button id="mailhopsDataPaneMapLink" class="navButton">&mailhops_route_nav_map_label;</button></vbox>
|
|
||||||
<vbox><button id="mailhopsDataPaneRefreshLink" class="navButton">&mailhops_route_nav_refresh_label;</button></vbox>
|
|
||||||
<vbox><button id="mailhopsDataPanePrefsLink" class="navButton">&mailhops_route_nav_options_label;</button></vbox>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
<vbox id="mailhopsDataPane" flex="1">
|
|
||||||
<label id="mailhopsDataPaneText" class="dataPaneAddressitem" tooltiptext=""></label>
|
|
||||||
<label id="mailhopsDataPaneText2" class="dataPaneAddressitem" tooltiptext=""></label>
|
|
||||||
<label id="mailhopsDataPaneText3" class="dataPaneAddressitem" tooltiptext=""></label>
|
|
||||||
</vbox>
|
|
||||||
|
|
||||||
<hbox id="mailhopsDetailsContainer" class="mailhopsContainer">
|
|
||||||
<vbox id="mailhopsDataPaneDetails" flex="1">
|
|
||||||
</vbox>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
</vbox>
|
|
||||||
|
|
||||||
<vbox id="dataPaneMailHopsAuthContainer" class="dataPaneBox">
|
|
||||||
<hbox flex="1" pack="start" align="center">
|
|
||||||
<label class="dataPaneHeader" crop="right" value="&mailhops_header_auth_label;"></label>
|
|
||||||
<separator class="dataPaneBoxSeparator" flex="1"></separator>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
<vbox id="mailhopsAuthDataPane" flex="1">
|
|
||||||
<label id="mailhopsDataPaneMailer" class="dataPaneAddressitem auth-item" value="" tooltiptext="Mailer"></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="mailhopsDataPaneDNSBL" class="text-link dataPaneAddressitem auth-item" value="" tooltiptext="DNSBL"></label>
|
|
||||||
</vbox>
|
|
||||||
</vbox>
|
|
||||||
|
|
||||||
<vbox id="dataPaneMailHopsListContainer" class="dataPaneBox">
|
|
||||||
<hbox flex="1" pack="start" align="center">
|
|
||||||
<label class="dataPaneHeader" crop="right" value="&mailhops_header_lists_label;"></label>
|
|
||||||
<separator class="dataPaneBoxSeparator" flex="1"></separator>
|
|
||||||
</hbox>
|
|
||||||
<vbox id="mailhopsListDataPane" flex="1"></vbox>
|
|
||||||
</vbox>
|
|
||||||
|
|
||||||
<vbox id="dataPaneMailHopsMetaContainer" class="dataPaneBox">
|
|
||||||
<hbox flex="1" pack="start" align="center">
|
|
||||||
<label class="dataPaneHeader" crop="right" value="&mailhops_header_meta_label;"></label>
|
|
||||||
<separator class="dataPaneBoxSeparator" flex="1"></separator>
|
|
||||||
</hbox>
|
|
||||||
<vbox id="mailhopsDataPaneMeta" flex="1"></vbox>
|
|
||||||
</vbox>
|
|
||||||
|
|
||||||
<vbox id="dataPaneMailHopsFunContainer" class="dataPaneBox">
|
|
||||||
<hbox flex="1" pack="start" align="center">
|
|
||||||
<label class="dataPaneHeader" crop="right" value="&mailhops_header_fun_label;"></label>
|
|
||||||
<separator class="dataPaneBoxSeparator" flex="1"></separator>
|
|
||||||
</hbox>
|
|
||||||
<hbox class="mailHopsLinkContainer">
|
|
||||||
<vbox><image id="mailhopsDataPaneSlackLink" src="chrome://mailhops/content/images/btn-add-to-slack-122x35.png" width="122" height="35" /></vbox>
|
|
||||||
</hbox>
|
|
||||||
</vbox>
|
|
||||||
|
|
||||||
</vbox>
|
|
||||||
|
|
||||||
</overlay>
|
|
@ -1,322 +0,0 @@
|
|||||||
var mailHopsDisplay =
|
|
||||||
{
|
|
||||||
resultBox: null,
|
|
||||||
resultText: null,
|
|
||||||
resultDetails: null,
|
|
||||||
container: null,
|
|
||||||
mapLink: null,
|
|
||||||
mailhopsDataPaneSPF: null,
|
|
||||||
mailhopsDataPaneDKIM: null,
|
|
||||||
mailhopsDataPaneMailer: null,
|
|
||||||
mailhopsDataPaneDNSBL: null,
|
|
||||||
mailhopsResultWeather: null,
|
|
||||||
options: null,
|
|
||||||
|
|
||||||
init: function(options){
|
|
||||||
|
|
||||||
this.options = options;
|
|
||||||
|
|
||||||
this.container = document.getElementById("mailhopsBox");
|
|
||||||
this.resultBox = document.getElementById("mailhopsResult");
|
|
||||||
this.resultText = document.getElementById("mailhopsResultText");
|
|
||||||
this.mailhopsResultWeather = document.getElementById("mailhopsResultWeather");
|
|
||||||
this.resultDetails = document.getElementById("mailhopsDataPaneDetails");
|
|
||||||
this.mapLink = document.getElementById("mailhopsMapLink");
|
|
||||||
//auth
|
|
||||||
this.mailhopsDataPaneSPF = document.getElementById("mailhopsDataPaneSPF");
|
|
||||||
this.mailhopsDataPaneDKIM = document.getElementById("mailhopsDataPaneDKIM");
|
|
||||||
this.mailhopsDataPaneMailer = document.getElementById("mailhopsDataPaneMailer");
|
|
||||||
this.mailhopsDataPaneDNSBL = document.getElementById("mailhopsDataPaneDNSBL");
|
|
||||||
|
|
||||||
//event listner for route click to launch map
|
|
||||||
this.mailhopsDataPaneDNSBL.addEventListener("click", function () {
|
|
||||||
if(this.hasAttribute('data-ip'))
|
|
||||||
mailHopsUtils.launchSpamHausURL( this.getAttribute('data-ip') );
|
|
||||||
});
|
|
||||||
|
|
||||||
this.mapLink.addEventListener("click", function () {
|
|
||||||
if(this.hasAttribute('data-route'))
|
|
||||||
mailHopsUtils.launchMap( String(this.getAttribute('data-route')), options );
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
lists: function( header_unsubscribe ){
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
auth: function( header_xmailer, header_useragent, header_xmimeole, header_auth, header_spf ){
|
|
||||||
//SPF
|
|
||||||
if(header_spf){
|
|
||||||
header_spf=header_spf.replace(/^\s+/,"");
|
|
||||||
var headerSPFArr=header_spf.split(' ');
|
|
||||||
this.mailhopsDataPaneSPF.setAttribute('value','SPF: '+headerSPFArr[0]);
|
|
||||||
this.mailhopsDataPaneSPF.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/'+headerSPFArr[0]+'.png)';
|
|
||||||
this.mailhopsDataPaneSPF.setAttribute('tooltiptext',header_spf+'\n'+mailHopsUtils.spf(headerSPFArr[0]));
|
|
||||||
this.mailhopsDataPaneSPF.style.display='block';
|
|
||||||
} else {
|
|
||||||
this.mailhopsDataPaneSPF.style.display='none';
|
|
||||||
}
|
|
||||||
//Authentication-Results
|
|
||||||
//http://tools.ietf.org/html/rfc5451
|
|
||||||
if(header_auth){
|
|
||||||
var headerAuthArr=header_auth.split(';');
|
|
||||||
var dkim_result;
|
|
||||||
var spf_result;
|
|
||||||
for(var h=0;h<headerAuthArr.length;h++){
|
|
||||||
if(headerAuthArr[h].indexOf('dkim=')!=-1){
|
|
||||||
dkim_result = headerAuthArr[h];
|
|
||||||
if(header_spf)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(!header_spf && headerAuthArr[h].indexOf('spf=')!=-1){
|
|
||||||
spf_result = headerAuthArr[h];
|
|
||||||
if(dkim_result)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(this.options.show_dkim && dkim_result){
|
|
||||||
dkim_result=dkim_result.replace(/^\s+/,"");
|
|
||||||
var dkimArr=dkim_result.split(' ');
|
|
||||||
this.mailhopsDataPaneDKIM.setAttribute('value','DKIM: '+dkimArr[0].replace('dkim=',''));
|
|
||||||
this.mailhopsDataPaneDKIM.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/'+dkimArr[0].replace('dkim=','')+'.png)';
|
|
||||||
this.mailhopsDataPaneDKIM.setAttribute('tooltiptext',dkim_result+'\n'+mailHopsUtils.dkim(dkimArr[0].replace('dkim=','')));
|
|
||||||
this.mailhopsDataPaneDKIM.style.display='block';
|
|
||||||
} else {
|
|
||||||
this.mailhopsDataPaneDKIM.style.display='none';
|
|
||||||
}
|
|
||||||
if(this.options.show_spf && spf_result){
|
|
||||||
spf_result=spf_result.replace(/^\s+/,"");
|
|
||||||
var spfArr=spf_result.split(' ');
|
|
||||||
this.mailhopsDataPaneSPF.setAttribute('value','SPF: '+spfArr[0].replace('spf=',''));
|
|
||||||
this.mailhopsDataPaneSPF.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/'+spfArr[0].replace('spf=','')+'.png)';
|
|
||||||
this.mailhopsDataPaneSPF.setAttribute('tooltiptext',spf_result+'\n'+mailHopsUtils.spf(spfArr[0].replace('spf=','')));
|
|
||||||
this.mailhopsDataPaneSPF.style.display='block';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.mailhopsDataPaneDKIM.style.display='none';
|
|
||||||
}
|
|
||||||
//X-Mailer, User-Agent or X-MimeOLE
|
|
||||||
if(header_xmailer){
|
|
||||||
this.mailhopsDataPaneMailer.style.backgroundImage = 'url(chrome://mailhops/content/images/email.png)';
|
|
||||||
if(header_xmailer.indexOf('(')!=-1)
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_xmailer.substring(0,header_xmailer.indexOf('(')));
|
|
||||||
else if(header_xmailer.indexOf('[')!=-1)
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_xmailer.substring(0,header_xmailer.indexOf('[')));
|
|
||||||
else
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_xmailer);
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('tooltiptext',header_xmailer);
|
|
||||||
this.mailhopsDataPaneMailer.style.display='block';
|
|
||||||
} else if(header_useragent){
|
|
||||||
this.mailhopsDataPaneMailer.style.backgroundImage = 'url(chrome://mailhops/content/images/email.png)';
|
|
||||||
if(header_useragent.indexOf('(')!=-1)
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_useragent.substring(0,header_useragent.indexOf('(')));
|
|
||||||
else if(header_useragent.indexOf('[')!=-1)
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_useragent.substring(0,header_useragent.indexOf('[')));
|
|
||||||
else
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_useragent);
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('tooltiptext',header_useragent);
|
|
||||||
this.mailhopsDataPaneMailer.style.display='block';
|
|
||||||
} else if(header_xmimeole){
|
|
||||||
this.mailhopsDataPaneMailer.style.backgroundImage = 'url(chrome://mailhops/content/images/email.png)';
|
|
||||||
|
|
||||||
if(header_xmimeole.indexOf('(')!=-1)
|
|
||||||
header_xmimeole = header_xmimeole.substring(0,header_xmimeole.indexOf('('));
|
|
||||||
else if(header_xmimeole.indexOf('[')!=-1)
|
|
||||||
header_xmimeole = header_xmimeole.substring(0,header_xmimeole.indexOf('['));
|
|
||||||
|
|
||||||
if(header_xmimeole.indexOf('Produced By ')!=-1)
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_xmimeole.replace('Produced By ',''));
|
|
||||||
else
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('value',header_xmimeole);
|
|
||||||
|
|
||||||
this.mailhopsDataPaneMailer.setAttribute('tooltiptext',header_xmimeole);
|
|
||||||
this.mailhopsDataPaneMailer.style.display='block';
|
|
||||||
} else {
|
|
||||||
this.mailhopsDataPaneMailer.style.display='none';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
error: function(status,data){
|
|
||||||
this.container.removeAttribute("route");
|
|
||||||
this.resultText.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/error.png)';
|
|
||||||
|
|
||||||
if(data && data.error){
|
|
||||||
this.resultText.setAttribute('value', status+': '+data.error.message);
|
|
||||||
this.resultText.setAttribute('tooltiptext',data.error.message);
|
|
||||||
} else {
|
|
||||||
this.resultText.setAttribute('value', ' Service Unavailable.');
|
|
||||||
this.resultText.setAttribute('tooltiptext',' Could not connect to MailHops API.');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
clear: function(no_ips){
|
|
||||||
|
|
||||||
this.mailhopsDataPaneDNSBL.style.display = 'none';
|
|
||||||
this.mailhopsResultWeather.style.display = 'none';
|
|
||||||
|
|
||||||
if(no_ips){
|
|
||||||
this.resultText.style.backgroundImage='url(chrome://mailhops/content/images/loader.gif)';
|
|
||||||
this.resultText.setAttribute('value',' Looking Up Route');
|
|
||||||
this.resultText.setAttribute('tooltiptext',' Looking Up Route');
|
|
||||||
} else {
|
|
||||||
this.resultText.style.backgroundImage = 'url(chrome://mailhops/content/images/loader.gif)';
|
|
||||||
this.resultText.value = ' Looking Up Route';
|
|
||||||
this.resultText.setAttribute('tooltiptext','Looking Up Route');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
route: function ( header_route, message, response, meta, lookup_url ){
|
|
||||||
|
|
||||||
var displayText=''
|
|
||||||
, distanceText=''
|
|
||||||
, image='chrome://mailhops/content/images/local.png'
|
|
||||||
, weather=null
|
|
||||||
, first=null;
|
|
||||||
|
|
||||||
//remove child details
|
|
||||||
while(this.resultDetails.firstChild) {
|
|
||||||
this.resultDetails.removeChild(this.resultDetails.firstChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(response && response.route && response.route.length){
|
|
||||||
|
|
||||||
if(this.options.client_location){
|
|
||||||
var client_location = JSON.parse(this.options.client_location);
|
|
||||||
//get distance from last route to client_location and add to response.distance.miles or kilometers
|
|
||||||
if(!response.route[response.route.length-1]['private']){
|
|
||||||
if(this.options.unit=='km')
|
|
||||||
response.distance.kilometers += mailHopsUtils.getDistance(response.route[response.route.length-1],client_location.route[0],this.options.unit);
|
|
||||||
else
|
|
||||||
response.distance.miles += mailHopsUtils.getDistance(response.route[response.route.length-1],client_location.route[0],this.options.unit);
|
|
||||||
}
|
|
||||||
//push client location to the end of the route
|
|
||||||
response.route.push(client_location.route[0]);
|
|
||||||
}
|
|
||||||
for(var i=0; i<response.route.length;i++){
|
|
||||||
//get the first hop location
|
|
||||||
if(!first && !response.route[i].private && !response.route[i].client){
|
|
||||||
first = response.route[i];
|
|
||||||
if(!!response.route[i].countryCode)
|
|
||||||
image='chrome://mailhops/content/images/flags/'+response.route[i].countryCode.toLowerCase()+'.png';
|
|
||||||
if(response.route[i].city)
|
|
||||||
this.resultText.setAttribute('tooltiptext','From '+response.route[i].city+', '+response.route[i].state);
|
|
||||||
else
|
|
||||||
this.resultText.setAttribute('tooltiptext','From '+response.route[i].countryName);
|
|
||||||
}
|
|
||||||
|
|
||||||
var menuitem = document.createElement('menuitem');
|
|
||||||
var label = '';
|
|
||||||
|
|
||||||
menuitem.setAttribute('class','menuitem-iconic');
|
|
||||||
|
|
||||||
if(response.route[i].countryCode)
|
|
||||||
menuitem.setAttribute('image','chrome://mailhops/content/images/flags/'+response.route[i].countryCode.toLowerCase()+'.png');
|
|
||||||
else
|
|
||||||
menuitem.setAttribute('image','chrome://mailhops/content/images/local.png');
|
|
||||||
|
|
||||||
if(response.route[i].city){
|
|
||||||
if(response.route[i].city && response.route[i].state)
|
|
||||||
label='Hop #'+(i+1)+' '+response.route[i].city+', '+response.route[i].state;
|
|
||||||
else
|
|
||||||
label='Hop #'+(i+1)+' '+response.route[i].city+', '+response.route[i].countryCode;
|
|
||||||
|
|
||||||
menuitem.setAttribute('tooltiptext','Click for WhoIs');
|
|
||||||
menuitem.setAttribute('data-ip',response.route[i].ip);
|
|
||||||
menuitem.addEventListener("click", function () {
|
|
||||||
mailHopsUtils.launchWhoIs(this.getAttribute('data-ip'));
|
|
||||||
}
|
|
||||||
, false);
|
|
||||||
} else if(response.route[i].countryName){
|
|
||||||
label='Hop #'+(i+1)+' '+response.route[i].countryName;
|
|
||||||
menuitem.setAttribute('tooltiptext','Click for WhoIs');
|
|
||||||
menuitem.setAttribute('data-ip',response.route[i].ip);
|
|
||||||
menuitem.addEventListener("click", function () {
|
|
||||||
mailHopsUtils.launchWhoIs(this.getAttribute('data-ip'));
|
|
||||||
}
|
|
||||||
, false);
|
|
||||||
} else {
|
|
||||||
label='Hop #'+(i+1)+' Private';
|
|
||||||
}
|
|
||||||
|
|
||||||
label+=' '+response.route[i].ip;
|
|
||||||
|
|
||||||
if(response.route[i].host)
|
|
||||||
label+=' '+response.route[i].host;
|
|
||||||
if(response.route[i].whois && response.route[i].whois.descr)
|
|
||||||
label+=' '+response.route[i].whois.descr;
|
|
||||||
if(response.route[i].whois && response.route[i].whois.netname)
|
|
||||||
label+=' '+response.route[i].whois.netname;
|
|
||||||
|
|
||||||
menuitem.setAttribute('label',label);
|
|
||||||
|
|
||||||
//append weather
|
|
||||||
if(!weather && response.route[i].weather){
|
|
||||||
weather = response.route[i].weather;
|
|
||||||
}
|
|
||||||
|
|
||||||
//append details
|
|
||||||
this.resultDetails.appendChild(menuitem);
|
|
||||||
|
|
||||||
//auth & dnsbl
|
|
||||||
if(!response.route[i].private && response.route[i].dnsbl && response.route[i].dnsbl.listed){
|
|
||||||
this.mailhopsDataPaneDNSBL.setAttribute('value','Blacklisted '+mailHopsUtils.dnsbl(response.route[i].dnsbl.record,true));
|
|
||||||
this.mailhopsDataPaneDNSBL.setAttribute('data-ip',response.route[i].ip);
|
|
||||||
if(response.route[i].dnsbl.record)
|
|
||||||
this.mailhopsDataPaneDNSBL.setAttribute('tooltiptext','Click for more details.\n'+mailHopsUtils.dnsbl(response.route[i].dnsbl.record));
|
|
||||||
else
|
|
||||||
this.mailhopsDataPaneDNSBL.setAttribute('tooltiptext','Click for more details.');
|
|
||||||
this.mailhopsDataPaneDNSBL.style.backgroundImage = 'url(chrome://mailhops/content/images/auth/bomb.png)';
|
|
||||||
this.mailhopsDataPaneDNSBL.style.display = 'block';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//set weather of sender
|
|
||||||
if(weather){
|
|
||||||
this.mailhopsResultWeather.style.display = 'block';
|
|
||||||
this.mailhopsResultWeather.setAttribute('tooltiptext',new Date(weather.time*1000));
|
|
||||||
this.mailhopsResultWeather.value = weather.summary+' '+Math.round(weather.temp)+'\u00B0';
|
|
||||||
this.mailhopsResultWeather.style.backgroundImage = 'url('+mailHopsUtils.getWeatherIcon(weather.icon)+')';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(image.indexOf('local')!=-1) {
|
|
||||||
displayText = ' Local message.';
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if(!!first){
|
|
||||||
if(!!first.city && !!first.state)
|
|
||||||
displayText = first.city+', '+first.state;
|
|
||||||
else if(!!first.city)
|
|
||||||
displayText = first.city+', '+first.countryCode;
|
|
||||||
else if(!!first.countryName)
|
|
||||||
displayText = first.countryName;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(response.distance){
|
|
||||||
if(this.options.unit=='km' && response.distance.kilometers > 0)
|
|
||||||
distanceText = mailHopsUtils.addCommas(Math.round(response.distance.kilometers))+' km traveled';
|
|
||||||
else if(response.distance.miles > 0)
|
|
||||||
distanceText = mailHopsUtils.addCommas(Math.round(response.distance.miles))+' mi traveled';
|
|
||||||
} else if(displayText=='')
|
|
||||||
displayText = ' Local message.';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(message.time != null){
|
|
||||||
message.time = message.time/1000;
|
|
||||||
if(message.time < 60)
|
|
||||||
distanceText += ' in '+message.time+' sec.';
|
|
||||||
else if(message.time < 3600) //something is wrong if it takes this long
|
|
||||||
distanceText += ' in '+Math.round(message.time/60)+' min.';
|
|
||||||
else //something is wrong if it takes this long
|
|
||||||
distanceText += ' in '+Math.round(message.time/60/60)+' hr.';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(header_route)
|
|
||||||
this.mapLink.setAttribute("data-route", header_route);
|
|
||||||
else
|
|
||||||
this.mapLink.removeAttribute("data-route");
|
|
||||||
|
|
||||||
this.resultText.setAttribute('value', displayText+' ( '+distanceText+' )');
|
|
||||||
this.resultText.style.backgroundImage = 'url('+image+')';
|
|
||||||
}//end route
|
|
||||||
};
|
|
@ -1,44 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE overlay SYSTEM "chrome://mailhops/locale/strings.dtd" >
|
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://mailhops/skin/tb-styles.css" type="text/css"?>
|
|
||||||
|
|
||||||
<overlay id="mailhopsOverlay"
|
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/utils.js"/>
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/tb-overlay.js"/>
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/mailhops.js"/>
|
|
||||||
|
|
||||||
<rows id="expandedHeader2Rows">
|
|
||||||
<row id="mailhopsBox" collapsed="false">
|
|
||||||
<label id="mailhopsLabel" value="&mailhops_header_route_label; " class="headerName"></label>
|
|
||||||
<hbox id="mailhopsResult" flex="1">
|
|
||||||
<label id="mailhopsResultText"></label>
|
|
||||||
<label id="mailhopsResultWeather"></label>
|
|
||||||
|
|
||||||
<button type="menu" class="msgHeaderView-button msgHeaderView-flat-button" label="hops" tooltiptext="Click to view route.">
|
|
||||||
<menupopup id="mailhopsDataPaneDetails">
|
|
||||||
</menupopup>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button id="mailhopsMapLink" class="msgHeaderView-button msgHeaderView-flat-button" label="&mailhops_route_nav_map_label;"></button>
|
|
||||||
|
|
||||||
<button id="mailhopsDataPaneRefreshLink" class="msgHeaderView-button msgHeaderView-flat-button" label="&mailhops_route_nav_refresh_label;"></button>
|
|
||||||
|
|
||||||
<button id="mailhopsDataPanePrefsLink" class="msgHeaderView-button msgHeaderView-flat-button" label="&mailhops_route_nav_options_label;"></button>
|
|
||||||
|
|
||||||
<label id="mailhopsDataPaneMailer" class="auth-item" value="" tooltiptext="Mailer"></label>
|
|
||||||
|
|
||||||
<label id="mailhopsDataPaneSPF" class="auth-item" value="" tooltiptext="SPF"></label>
|
|
||||||
|
|
||||||
<label id="mailhopsDataPaneDKIM" class="auth-item" value="" tooltiptext="DKIM"></label>
|
|
||||||
|
|
||||||
<label id="mailhopsDataPaneDNSBL" class="text-link auth-item" value="" tooltiptext="DNSBL"></label>
|
|
||||||
|
|
||||||
</hbox>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
|
|
||||||
</overlay>
|
|
@ -209,19 +209,5 @@ getDistance: function(from, to, unit) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
|
||||||
|
|
||||||
postToWebhook: function(mapUrl,options){
|
|
||||||
var slackUrl = 'https://hooks.slack.com/services/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';
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open("POST", slackUrl, false);
|
|
||||||
xhr.setRequestHeader("Content-type", "application/json");
|
|
||||||
xhr.onreadystatechange = function() {
|
|
||||||
if(xhr.readyState === 4 && xhr.status == 200) {
|
|
||||||
return JSON.parse(xmlhttp.responseText);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var payload = {"text":"MailHops <"+mapUrl+"|Map> "};
|
|
||||||
xhr.send(JSON.stringify(payload));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops Strecke">
|
<!ENTITY mailhops_header_route_label "MailHops Strecke">
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
||||||
<!ENTITY mailhops_header_lists_label "MailHops MailHops Listen">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
||||||
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "Karte">
|
<!ENTITY mailhops_route_nav_map_label "Karte">
|
||||||
<!ENTITY mailhops_route_nav_details_label "Einzelheiten">
|
<!ENTITY mailhops_route_nav_details_label "Einzelheiten">
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "erfrischen">
|
<!ENTITY mailhops_route_nav_refresh_label "erfrischen">
|
||||||
<!ENTITY mailhops_route_nav_options_label "Optionen">
|
<!ENTITY mailhops_route_nav_options_label "Vorlieben">
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
mailhops_header_route_label=MailHops Strecke
|
mailhops_header_route_label=MailHops Strecke
|
||||||
mailhops_header_auth_label=MailHops/Auth
|
mailhops_header_auth_label=MailHops/Auth
|
||||||
mailhops_header_lists_label=MailHops Listen
|
|
||||||
mailhops_header_meta_label=MailHops Meta
|
mailhops_header_meta_label=MailHops Meta
|
||||||
mailhops_route_nav_map_label=Karte
|
mailhops_route_nav_map_label=Karte
|
||||||
mailhops_route_nav_details_label=Einzelheiten
|
mailhops_route_nav_details_label=Einzelheiten
|
||||||
mailhops_route_nav_refresh_label=erfrischen
|
mailhops_route_nav_refresh_label=erfrischen
|
||||||
mailhops_route_nav_options_label=Optionen
|
mailhops_route_nav_options_label=Vorlieben
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops Route">
|
<!ENTITY mailhops_header_route_label "MailHops Route">
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
||||||
<!ENTITY mailhops_header_fun_label "MailHops Fun">
|
|
||||||
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "map">
|
<!ENTITY mailhops_route_nav_map_label "map">
|
||||||
<!ENTITY mailhops_route_nav_details_label "details">
|
<!ENTITY mailhops_route_nav_details_label "details">
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "refresh">
|
<!ENTITY mailhops_route_nav_refresh_label "refresh">
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
mailhops_header_route_label=MailHops Route
|
mailhops_header_route_label=MailHops Route
|
||||||
mailhops_header_auth_label=MailHops/Auth
|
mailhops_header_auth_label=MailHops/Auth
|
||||||
mailhops_header_lists_label=MailHops Lists
|
|
||||||
mailhops_header_meta_label=MailHops Meta
|
mailhops_header_meta_label=MailHops Meta
|
||||||
mailhops_header_fun_label=MailHops Fun
|
|
||||||
mailhops_route_nav_map_label=map
|
mailhops_route_nav_map_label=map
|
||||||
mailhops_route_nav_details_label=details
|
mailhops_route_nav_details_label=details
|
||||||
mailhops_route_nav_refresh_label=refresh
|
mailhops_route_nav_refresh_label=refresh
|
||||||
mailhops_route_nav_options_label=options
|
mailhops_route_nav_options_label=Preferences
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops Ruta">
|
<!ENTITY mailhops_header_route_label "MailHops Ruta">
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Aut">
|
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Aut">
|
||||||
<!ENTITY mailhops_header_lists_label "MailHops Listas">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
||||||
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "mapa">
|
<!ENTITY mailhops_route_nav_map_label "mapa">
|
||||||
<!ENTITY mailhops_route_nav_details_label "detalles">
|
<!ENTITY mailhops_route_nav_details_label "detalles">
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "refrescar">
|
<!ENTITY mailhops_route_nav_refresh_label "refrescar">
|
||||||
<!ENTITY mailhops_route_nav_options_label "opciones">
|
<!ENTITY mailhops_route_nav_options_label "Preferencias">
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
mailhops_header_route_label=MailHops Ruta
|
mailhops_header_route_label=MailHops Ruta
|
||||||
mailhops_header_auth_label=MailHops Mailer/Aut
|
mailhops_header_auth_label=MailHops Mailer/Aut
|
||||||
mailhops_header_lists_label=MailHops Listas
|
|
||||||
mailhops_header_meta_label=MailHops Meta
|
mailhops_header_meta_label=MailHops Meta
|
||||||
mailhops_route_nav_map_label=mapa
|
mailhops_route_nav_map_label=mapa
|
||||||
mailhops_route_nav_details_label=detalles
|
mailhops_route_nav_details_label=detalles
|
||||||
mailhops_route_nav_refresh_label=refrescar
|
mailhops_route_nav_refresh_label=refrescar
|
||||||
mailhops_route_nav_options_label=opciones
|
mailhops_route_nav_options_label=Preferencias
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops Route">
|
<!ENTITY mailhops_header_route_label "MailHops Route">
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
||||||
<!ENTITY mailhops_header_lists_label "MailHops listes">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
||||||
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "carte">
|
<!ENTITY mailhops_route_nav_map_label "carte">
|
||||||
<!ENTITY mailhops_route_nav_details_label "détails">
|
<!ENTITY mailhops_route_nav_details_label "détails">
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "rafraîchir">
|
<!ENTITY mailhops_route_nav_refresh_label "rafraîchir">
|
||||||
<!ENTITY mailhops_route_nav_options_label "les options">
|
<!ENTITY mailhops_route_nav_options_label "Préférences">
|
||||||
|
@ -5,4 +5,4 @@ mailhops_header_meta_label=MailHops Meta
|
|||||||
mailhops_route_nav_map_label=carte
|
mailhops_route_nav_map_label=carte
|
||||||
mailhops_route_nav_details_label=détails
|
mailhops_route_nav_details_label=détails
|
||||||
mailhops_route_nav_refresh_label=rafraîchir
|
mailhops_route_nav_refresh_label=rafraîchir
|
||||||
mailhops_route_nav_options_label=les options
|
mailhops_route_nav_options_label=Préférences
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHopsルート">
|
<!ENTITY mailhops_header_route_label "MailHopsルート">
|
||||||
<!ENTITY mailhops_header_auth_label "MailHopsメーラー/認証">
|
<!ENTITY mailhops_header_auth_label "MailHopsメーラー/認証">
|
||||||
<!ENTITY mailhops_header_lists_label "リストをMailHops">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHopsメタ">
|
<!ENTITY mailhops_header_meta_label "MailHopsメタ">
|
||||||
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "マップ">
|
<!ENTITY mailhops_route_nav_map_label "マップ">
|
||||||
<!ENTITY mailhops_route_nav_details_label "細部">
|
<!ENTITY mailhops_route_nav_details_label "細部">
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "リフレッシュ">
|
<!ENTITY mailhops_route_nav_refresh_label "リフレッシュ">
|
||||||
<!ENTITY mailhops_route_nav_options_label "オプション">
|
<!ENTITY mailhops_route_nav_options_label "設定">
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
mailhops_header_route_label=MailHopsルート
|
mailhops_header_route_label=MailHopsルート
|
||||||
mailhops_header_auth_label=MailHopsメーラー/認証
|
mailhops_header_auth_label=MailHopsメーラー/認証
|
||||||
mailhops_header_lists_label=リストをMailHops
|
|
||||||
mailhops_header_meta_label=MailHopsメタ
|
mailhops_header_meta_label=MailHopsメタ
|
||||||
mailhops_route_nav_map_label=マップ
|
mailhops_route_nav_map_label=マップ
|
||||||
mailhops_route_nav_details_label=細部
|
mailhops_route_nav_details_label=細部
|
||||||
mailhops_route_nav_refresh_label=リフレッシュ
|
mailhops_route_nav_refresh_label=リフレッシュ
|
||||||
mailhops_route_nav_options_label=オプション
|
mailhops_route_nav_options_label=設定
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops Route">
|
<!ENTITY mailhops_header_route_label "MailHops Route">
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
||||||
<!ENTITY mailhops_header_lists_label "MailHops Lists">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
||||||
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "mapa">
|
<!ENTITY mailhops_route_nav_map_label "mapa">
|
||||||
<!ENTITY mailhops_route_nav_details_label "detalhes">
|
<!ENTITY mailhops_route_nav_details_label "detalhes">
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "refrescar">
|
<!ENTITY mailhops_route_nav_refresh_label "refrescar">
|
||||||
<!ENTITY mailhops_route_nav_options_label "opções">
|
<!ENTITY mailhops_route_nav_options_label "Preferências">
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
mailhops_header_route_label=MailHops Route
|
mailhops_header_route_label=MailHops Route
|
||||||
mailhops_header_auth_label=MailHops Mailer/Auth
|
mailhops_header_auth_label=MailHops Mailer/Auth
|
||||||
mailhops_header_lists_label=MailHops Lists
|
|
||||||
mailhops_header_meta_label=MailHops Meta
|
mailhops_header_meta_label=MailHops Meta
|
||||||
mailhops_route_nav_map_label=mapa
|
mailhops_route_nav_map_label=mapa
|
||||||
mailhops_route_nav_details_label=detalhes
|
mailhops_route_nav_details_label=detalhes
|
||||||
mailhops_route_nav_refresh_label=refrescar
|
mailhops_route_nav_refresh_label=refrescar
|
||||||
mailhops_route_nav_options_label=opções
|
mailhops_route_nav_options_label=Preferências
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops маршрута">
|
<!ENTITY mailhops_header_route_label "MailHops маршрута">
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Мейлер / Авт">
|
<!ENTITY mailhops_header_auth_label "MailHops Мейлер / Авт">
|
||||||
<!ENTITY mailhops_header_lists_label "MailHops списки">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Мета">
|
<!ENTITY mailhops_header_meta_label "MailHops Мета">
|
||||||
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "карта">
|
<!ENTITY mailhops_route_nav_map_label "карта">
|
||||||
<!ENTITY mailhops_route_nav_details_label "подробности">
|
<!ENTITY mailhops_route_nav_details_label "подробности">
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "обновление">
|
<!ENTITY mailhops_route_nav_refresh_label "обновление">
|
||||||
<!ENTITY mailhops_route_nav_options_label "опции">
|
<!ENTITY mailhops_route_nav_options_label "предпочтения">
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
mailhops_header_route_label=MailHops маршрута
|
mailhops_header_route_label=MailHops маршрута
|
||||||
mailhops_header_auth_label=MailHops Мейлер / Авт
|
mailhops_header_auth_label=MailHops Мейлер / Авт
|
||||||
mailhops_header_lists_label=MailHops списки
|
|
||||||
mailhops_header_meta_label=MailHops Мета
|
mailhops_header_meta_label=MailHops Мета
|
||||||
mailhops_route_nav_map_label=карта
|
mailhops_route_nav_map_label=карта
|
||||||
mailhops_route_nav_details_label=подробности
|
mailhops_route_nav_details_label=подробности
|
||||||
mailhops_route_nav_refresh_label=обновление
|
mailhops_route_nav_refresh_label=обновление
|
||||||
mailhops_route_nav_options_label=опции
|
mailhops_route_nav_options_label=предпочтения
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops路线">
|
<!ENTITY mailhops_header_route_label "MailHops路线">
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops梅勒/验证">
|
<!ENTITY mailhops_header_auth_label "MailHops梅勒/验证">
|
||||||
<!ENTITY mailhops_header_lists_label "MailHops列表">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops元">
|
<!ENTITY mailhops_header_meta_label "MailHops元">
|
||||||
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "地圖">
|
<!ENTITY mailhops_route_nav_map_label "地圖">
|
||||||
<!ENTITY mailhops_route_nav_details_label "詳細信息">
|
<!ENTITY mailhops_route_nav_details_label "詳細信息">
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "刷新">
|
<!ENTITY mailhops_route_nav_refresh_label "刷新">
|
||||||
<!ENTITY mailhops_route_nav_options_label "選項">
|
<!ENTITY mailhops_route_nav_options_label "优先">
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
mailhops_header_route_label=MailHops路线
|
mailhops_header_route_label=MailHops路线
|
||||||
mailhops_header_auth_label=MailHops梅勒/验证
|
mailhops_header_auth_label=MailHops梅勒/验证
|
||||||
mailhops_header_lists_label=MailHops列表
|
|
||||||
mailhops_header_meta_label=MailHops元
|
mailhops_header_meta_label=MailHops元
|
||||||
mailhops_route_nav_map_label=地圖
|
mailhops_route_nav_map_label=地圖
|
||||||
mailhops_route_nav_details_label=詳細信息
|
mailhops_route_nav_details_label=詳細信息
|
||||||
mailhops_route_nav_refresh_label=刷新
|
mailhops_route_nav_refresh_label=刷新
|
||||||
mailhops_route_nav_options_label="選項
|
mailhops_route_nav_options_label=优先
|
||||||
|
@ -1,157 +0,0 @@
|
|||||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
|
||||||
|
|
||||||
#mailhopsBox {cursor:pointer;}
|
|
||||||
|
|
||||||
#mailhopsResultText {padding-left:4px;}
|
|
||||||
|
|
||||||
#mailHopsResultImage {padding-left:4px;display: none;}
|
|
||||||
|
|
||||||
#mailhopsDataPaneDetailsLink{
|
|
||||||
margin-left: 10px;
|
|
||||||
text-align: center;
|
|
||||||
padding-right: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsDataPaneDetailsLink.active{
|
|
||||||
color: #FFF;
|
|
||||||
margin-left: 10px;
|
|
||||||
background-color: #98a5b3;
|
|
||||||
-moz-border-radius: 10px;
|
|
||||||
-webkit-border-radius: 10px;
|
|
||||||
-khtml-border-radius: 10px;
|
|
||||||
border-radius: 10px;
|
|
||||||
text-align: center;
|
|
||||||
padding-right: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsDataPane{
|
|
||||||
padding-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailhopsDetail{
|
|
||||||
padding-bottom: 2px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailHopsLinkContainer{
|
|
||||||
padding-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailhopsContainer{
|
|
||||||
margin-left: 10px;
|
|
||||||
margin-right: 10px;
|
|
||||||
border: 1px solid #e1e2e5;
|
|
||||||
background-color: #f7f8f9;
|
|
||||||
-moz-border-radius: 5px;
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
-khtml-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 8px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailhopsWeather, .mailhopsHost, .mailhopsSecureHost, .mailhopsSecure, .mailhopsW3w {
|
|
||||||
margin-left: 30px;
|
|
||||||
padding-bottom: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailhopsSecureHost{
|
|
||||||
background-image: url(chrome://mailhops/content/images/secure_host.png);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailhopsHost{
|
|
||||||
background-image: url(chrome://mailhops/content/images/host.png);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailhopsSecure{
|
|
||||||
background-image: url(chrome://mailhops/content/images/secure.png);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailhopsW3w {
|
|
||||||
background-image: url(chrome://mailhops/content/images/w3w.png);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-item{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsDataPaneMeta label{
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mhTabs .act {
|
|
||||||
padding: 5px 10px 5px 20px;
|
|
||||||
outline: none;
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailHopsPreferences {
|
|
||||||
font-family: 'Raleway',Arial,sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailHopsPreferences textbox {
|
|
||||||
font-size: 14px;
|
|
||||||
padding: 5px;
|
|
||||||
color: #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailHopsPreferences tab {
|
|
||||||
font-size: 14px;
|
|
||||||
padding: 5px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-lock {
|
|
||||||
padding-top: 7px;
|
|
||||||
color: rgba(73,163,127,1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-unlock-alt {
|
|
||||||
padding-top: 7px;
|
|
||||||
color: rgba(255,0,0,1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailHopsLinkContainer button, #mailHopsPreferences button{
|
|
||||||
height: 35px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailHopsLinkContainer button.navButton, button.navButton {
|
|
||||||
height: 25px;
|
|
||||||
width: 10px;
|
|
||||||
text-align: center;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes pulsate{0%{-moz-transform:scale(.3);opacity:.2}100%{-moz-transform:scale(1.1);opacity:1}}@-webkit-keyframes pulsate{0%{-webkit-transform:scale(.3);opacity:.2}100%{-webkit-transform:scale(1.1);opacity:1}}@keyframes pulsate{0%{-webkit-transform:scale(.3);transform:scale(.3);opacity:.2}100%{-webkit-transform:scale(1.1);transform:scale(1.1);opacity:1}}.SmartStatus-container{max-width:165px;display:flex}.SmartStatus-iconContainer{padding:2px;flex:0 1 auto}.SmartStatus--success{color:#5CB85C;margin-bottom:20px;padding:0}.SmartStatus--failed{color:#D9534F;margin-top:20px;padding:0}.SmartStatus--running{color:#848992;margin-top:10px;padding:0;-webkit-animation:pulsate 1.5s linear infinite alternate;-moz-animation:pulsate 1.5s linear infinite alternate;animation:pulsate 1.5s linear infinite alternate}.SmartStatus-tooltip{text-align:left;max-width:250px;padding:10px;line-height:22px}.SmartStatus-tooltip--successful,.SmartStatus-tooltip--success{color:#5CB85C;padding-left:5px;padding-right:0;text-shadow:-1px -1px 0 #FFFFFF,1px -1px 0 #FFFFFF,-1px 1px 0 #FFFFFF,1px 1px 0 #FFFFFF}.SmartStatus-tooltip--failed{color:#D9534F;padding-left:5px;padding-right:0;text-shadow:-1px -1px 0 #FFFFFF,1px -1px 0 #FFFFFF,-1px 1px 0 #FFFFFF,1px 1px 0 #FFFFFF}.SmartStatus-tooltip--running{color:#161B1F;padding-left:5px;padding-right:0;text-shadow:-1px -1px 0 #FFFFFF,1px -1px 0 #FFFFFF,-1px 1px 0 #FFFFFF,1px 1px 0 #FFFFFF;-webkit-animation:pulsate 1.5s linear infinite alternate;-moz-animation:pulsate 1.5s linear infinite alternate;animation:pulsate 1.5s linear infinite alternate}
|
|
||||||
.running {
|
|
||||||
font-size: 13px;
|
|
||||||
animation: pulsate 1.5s linear infinite alternate;
|
|
||||||
color: #5CB85C;
|
|
||||||
}
|
|
||||||
.running:before {
|
|
||||||
content: "\f111"
|
|
||||||
}
|
|
||||||
.error {
|
|
||||||
font-size: 13px;
|
|
||||||
color: rgba(255,0,0,.6);
|
|
||||||
}
|
|
||||||
.error:before {
|
|
||||||
content: "\f111"
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailhopsDataPaneSlackLink{
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
|
||||||
|
|
||||||
#mailhopsBox #mailhopsResultText { padding-left:20px; background-repeat: no-repeat; }
|
|
||||||
|
|
||||||
#mailhopsBox menuitem .menu-iconic-icon { width: 16px; height: 11px; }
|
|
||||||
|
|
||||||
#mailhopsBox .auth-item { display: none; background-repeat: no-repeat; padding-left: 18px; }
|
|
||||||
|
|
||||||
#mhTabs .act { padding-left: 20px; background-repeat: no-repeat; outline : none;}
|
|
||||||
|
|
||||||
#mailhopsResultWeather { display: none; background-repeat: no-repeat; padding-left: 18px; }
|
|
||||||
|
|
||||||
#mailHopsPreferences {
|
|
||||||
font-family: 'Raleway',Arial,sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailHopsPreferences textbox {
|
|
||||||
font-size: 14px;
|
|
||||||
padding: 5px;
|
|
||||||
color: #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailHopsPreferences tab {
|
|
||||||
font-size: 14px;
|
|
||||||
padding: 5px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsResult label {
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
@ -5,7 +5,7 @@
|
|||||||
<Description about="urn:mozilla:install-manifest">
|
<Description about="urn:mozilla:install-manifest">
|
||||||
<em:type>2</em:type>
|
<em:type>2</em:type>
|
||||||
<em:id>thunderbird@mailhops.com</em:id>
|
<em:id>thunderbird@mailhops.com</em:id>
|
||||||
<em:version>2.0.0</em:version>
|
<em:version>3.0.0</em:version>
|
||||||
|
|
||||||
<em:name>MailHops</em:name>
|
<em:name>MailHops</em:name>
|
||||||
<em:description>MailHops maps the route an email took to get to you. Displaying the senders location, weather, user-agent and authentication used.</em:description>
|
<em:description>MailHops maps the route an email took to get to you. Displaying the senders location, weather, user-agent and authentication used.</em:description>
|
||||||
@ -13,7 +13,6 @@
|
|||||||
<em:homepageURL>https://www.mailhops.com</em:homepageURL>
|
<em:homepageURL>https://www.mailhops.com</em:homepageURL>
|
||||||
<em:creator>Andrew Van Tassel</em:creator>
|
<em:creator>Andrew Van Tassel</em:creator>
|
||||||
<em:optionsURL>chrome://mailhops/content/preferences.xul</em:optionsURL>
|
<em:optionsURL>chrome://mailhops/content/preferences.xul</em:optionsURL>
|
||||||
<!-- <em:updateURL>https://dl.dropbox.com/u/1533417/mailhops_update.rdf</em:updateURL> -->
|
|
||||||
|
|
||||||
<!-- Postbox -->
|
<!-- Postbox -->
|
||||||
<em:targetApplication>
|
<em:targetApplication>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user