TB78 Update
@ -1,5 +1,10 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 4.0.0 - 2020-11-10
|
||||||
|
- Support for Thunderbird 78.*
|
||||||
|
- Complete rewrite of code structure
|
||||||
|
- (thanks to Jürgen Ernst and his [Display mail user agent](https://addons.thunderbird.net/ja/thunderbird/addon/display-mail-user-agent-t/) for some direction)
|
||||||
|
|
||||||
## 3.8.0 - 2020-06-02
|
## 3.8.0 - 2020-06-02
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -13,7 +13,7 @@ MailHops is an email route API. It does a few things:
|
|||||||
|
|
||||||
### MailHops Message View
|
### MailHops Message View
|
||||||
|
|
||||||
<img src="images/screenshot-thunderbird.png" alt="MailHops Message View" title="MailHops Message View" style="border: 1px solid #777;" />
|
<img src="images/screenshot-tb78-view.png" alt="MailHops Message View" title="MailHops Message View" style="border: 1px solid #777;" />
|
||||||
|
|
||||||
### MailHops Route Map
|
### MailHops Route Map
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ MailHops is an email route API. It does a few things:
|
|||||||
|
|
||||||
### MailHops Options
|
### MailHops Options
|
||||||
|
|
||||||
<img src="images/screenshot-display.png" alt="MailHops Options" title="MailHops Options" style="border: 1px solid #777;" />
|
<img src="images/screenshot-tb78-preferences.png" alt="MailHops Options" title="MailHops Options" style="border: 1px solid #777;" />
|
||||||
|
|
||||||
### MailHops Dashboard
|
### MailHops Dashboard
|
||||||
|
|
||||||
|
2
build.sh
@ -4,4 +4,4 @@ filename='mailhops'
|
|||||||
|
|
||||||
rm -f $filename.zip
|
rm -f $filename.zip
|
||||||
|
|
||||||
zip -r $filename.zip ./ -x ./images/* -i *.js *.xul *.png *.gif *.css *.json *.dtd _locales/*/messages.json *.manifest
|
zip -r $filename.zip ./ -i *.js *.xhtml *.html *.png *.svg *.gif *.css *.json _locales/*/messages.json
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
content mailhops chrome/content/
|
|
||||||
|
|
||||||
skin mailhops classic/1.0 chrome/skin/classic/
|
|
||||||
|
|
||||||
locale mailhops de chrome/locale/de/
|
|
||||||
locale mailhops en chrome/locale/en/
|
|
||||||
locale mailhops es chrome/locale/es/
|
|
||||||
locale mailhops fr chrome/locale/fr/
|
|
||||||
locale mailhops ja chrome/locale/ja/
|
|
||||||
locale mailhops pl chrome/locale/pl/
|
|
||||||
locale mailhops pt-BR chrome/locale/pt-BR/
|
|
||||||
locale mailhops ru chrome/locale/ru/
|
|
||||||
locale mailhops zh-CN chrome/locale/zh-CN/
|
|
||||||
|
|
||||||
overlay chrome://messenger/content/messenger.xul chrome://mailhops/content/msgNotificationBar.xul
|
|
||||||
overlay chrome://messenger/content/messenger.xul chrome://mailhops/content/msgListColumn.xul
|
|
@ -1,444 +0,0 @@
|
|||||||
var mailHopsDisplay =
|
|
||||||
{
|
|
||||||
resultBox: null,
|
|
||||||
resultText: null,
|
|
||||||
resultDetails: null,
|
|
||||||
mailhopsDataPaneHops: null,
|
|
||||||
mailhopsDataPaneSPF: null,
|
|
||||||
mailhopsDataPaneDKIM: null,
|
|
||||||
mailhopsDataPaneMailer: null,
|
|
||||||
mailhopsDataPaneDNSBL: null,
|
|
||||||
mailhopsResultWeather: null,
|
|
||||||
mailhopsUnsubscribe: null,
|
|
||||||
mailHopsAccountMessage: null,
|
|
||||||
mhBox: null,
|
|
||||||
options: null,
|
|
||||||
|
|
||||||
init: function(options, reload){
|
|
||||||
|
|
||||||
this.options = options;
|
|
||||||
this.mhBox = document.getElementById("mailhopsNoficationBox");
|
|
||||||
this.mhNoteBox = document.getElementById("mailhopsNotification");
|
|
||||||
this.resultBox = document.getElementById("mailhopsResult");
|
|
||||||
this.resultText = document.getElementById("mailhopsResultText");
|
|
||||||
this.mailhopsResultWeather = document.getElementById("mailhopsResultWeather");
|
|
||||||
this.mailhopsUnsubscribe = document.getElementById("mailhopsUnsubscribe");
|
|
||||||
this.resultDetails = document.getElementById("mailhopsDataPaneDetails");
|
|
||||||
this.mailHopsAccountMessage = document.getElementById("mailHopsAccountMessage");
|
|
||||||
this.mailhopsDataPaneHops = document.getElementById("mailhopsDataPaneHops");
|
|
||||||
|
|
||||||
//auth
|
|
||||||
this.mailhopsDataPaneSPF = document.getElementById("mailhopsDataPaneSPF");
|
|
||||||
this.mailhopsDataPaneDKIM = document.getElementById("mailhopsDataPaneDKIM");
|
|
||||||
this.mailhopsDataPaneMailer = document.getElementById("mailhopsDataPaneMailer");
|
|
||||||
this.mailhopsDataPaneDNSBL = document.getElementById("mailhopsDataPaneDNSBL");
|
|
||||||
|
|
||||||
//wait for message to be selected before showing
|
|
||||||
if (!reload && this.mhBox)
|
|
||||||
this.mhBox.style.display = 'none';
|
|
||||||
|
|
||||||
//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.resultText.addEventListener("click", function () {
|
|
||||||
if(this.value.indexOf('Rate Limit')!==-1)
|
|
||||||
window.openDialog("chrome://mailhops/content/preferences.xul","","chrome, dialog, modal, centerscreen").focus();
|
|
||||||
else if(this.hasAttribute('data-route'))
|
|
||||||
mailHopsUtils.launchMap( String(this.getAttribute('data-route')), options );
|
|
||||||
});
|
|
||||||
|
|
||||||
this.mailhopsResultWeather.addEventListener("click", function () {
|
|
||||||
mailHopsUtils.launchExternalURL(this.getAttribute('href'));
|
|
||||||
});
|
|
||||||
|
|
||||||
this.mailHopsAccountMessage.addEventListener("click", function () {
|
|
||||||
mailHopsUtils.launchExternalURL(this.getAttribute('href'));
|
|
||||||
this.style.display = 'none';
|
|
||||||
});
|
|
||||||
|
|
||||||
this.mailhopsDataPaneHops.addEventListener("click", function () {
|
|
||||||
this.parentElement.classList.toggle('active');
|
|
||||||
if(mailHopsDisplay.resultDetails.style.display !== 'block')
|
|
||||||
mailHopsDisplay.resultDetails.style.display = 'block';
|
|
||||||
else
|
|
||||||
mailHopsDisplay.resultDetails.style.display = 'none';
|
|
||||||
});
|
|
||||||
|
|
||||||
this.mailhopsUnsubscribe.addEventListener("click", function () {
|
|
||||||
if(this.getAttribute('href'))
|
|
||||||
mailHopsUtils.launchExternalURL(this.getAttribute('href'));
|
|
||||||
});
|
|
||||||
|
|
||||||
if(!!options.bar_color)
|
|
||||||
this.mhNoteBox.style.background = options.bar_color;
|
|
||||||
else
|
|
||||||
this.mhNoteBox.style.background = '';
|
|
||||||
|
|
||||||
if(!!options.font_size)
|
|
||||||
this.mhNoteBox.style.fontSize = options.font_size;
|
|
||||||
|
|
||||||
if(!!options.font_color){
|
|
||||||
this.resultText.style.color = options.font_color;
|
|
||||||
this.mailhopsResultWeather.style.color = options.font_color;
|
|
||||||
this.mailhopsUnsubscribe.style.color = options.font_color;
|
|
||||||
this.mailhopsDataPaneSPF.style.color = options.font_color;
|
|
||||||
this.mailhopsDataPaneDKIM.style.color = options.font_color;
|
|
||||||
this.mailhopsDataPaneMailer.style.color = options.font_color;
|
|
||||||
this.mailhopsDataPaneDNSBL.style.color = options.font_color;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
lists: function( header_unsubscribe ){
|
|
||||||
|
|
||||||
this.mailhopsUnsubscribe.style.display='none';
|
|
||||||
|
|
||||||
if(header_unsubscribe){
|
|
||||||
this.mailhopsUnsubscribe.style.display='';
|
|
||||||
var listArr=header_unsubscribe.split(',');
|
|
||||||
var href='';
|
|
||||||
if(listArr.length){
|
|
||||||
for(var h=0;h<listArr.length;h++){
|
|
||||||
href = listArr[h].replace('<','').replace('>','');
|
|
||||||
if(href.indexOf('mailto:')!=-1){
|
|
||||||
if(href.toLowerCase().indexOf('subject=')==-1){
|
|
||||||
if(href.indexOf('?')==-1)
|
|
||||||
href+='?subject=Unsubscribe';
|
|
||||||
else
|
|
||||||
href+='&subject=Unsubscribe';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.mailhopsUnsubscribe.setAttribute('href',href);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
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.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.mhBox.style.display = '';
|
|
||||||
this.mailhopsDataPaneDNSBL.style.display = 'none';
|
|
||||||
this.mailhopsResultWeather.style.display = 'none';
|
|
||||||
this.resultText.removeAttribute('data-route');
|
|
||||||
this.resultText.style.backgroundImage = '';
|
|
||||||
//remove child details
|
|
||||||
while(this.resultDetails.firstChild) {
|
|
||||||
this.resultDetails.removeChild(this.resultDetails.firstChild);
|
|
||||||
}
|
|
||||||
this.mailHopsAccountMessage.style.display = 'none';
|
|
||||||
|
|
||||||
if(no_ips){
|
|
||||||
this.resultText.style.backgroundImage = "url('chrome://mailhops/content/images/local.png')";
|
|
||||||
this.resultText.value = ' Looks like a local message';
|
|
||||||
} else {
|
|
||||||
this.resultText.style.backgroundImage = "url('chrome://mailhops/content/images/refresh.png')";
|
|
||||||
this.resultText.value = ' Looking Up Route...';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
route: function ( header_route, message, response, meta, lookup_url ){
|
|
||||||
|
|
||||||
var displayText=''
|
|
||||||
, distanceText=''
|
|
||||||
, image='chrome://mailhops/content/images/local.png'
|
|
||||||
, weatherRoute=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';
|
|
||||||
this.resultText.setAttribute('tooltiptext','View Map');
|
|
||||||
}
|
|
||||||
|
|
||||||
var hop = document.createElement('label');
|
|
||||||
var label = '';
|
|
||||||
|
|
||||||
if(response.route[i].countryCode)
|
|
||||||
hop.style.backgroundImage = "url('chrome://mailhops/content/images/flags/"+response.route[i].countryCode.toLowerCase()+".png')";
|
|
||||||
else if(response.route[i].coords)
|
|
||||||
hop.style.backgroundImage = "url('chrome://mailhops/content/images/auth/none.png')";
|
|
||||||
else
|
|
||||||
hop.style.backgroundImage = "url('chrome://mailhops/content/images/local.png')";
|
|
||||||
|
|
||||||
if(response.route[i].coords){
|
|
||||||
|
|
||||||
hop.setAttribute('class','bar-link hop');
|
|
||||||
|
|
||||||
if(response.route[i].city && response.route[i].state)
|
|
||||||
label='Hop #'+(i+1)+' '+response.route[i].city+', '+response.route[i].state;
|
|
||||||
else if(response.route[i].city && response.route[i].countryCode)
|
|
||||||
label='Hop #'+(i+1)+' '+response.route[i].city+', '+response.route[i].countryCode;
|
|
||||||
else if(response.route[i].city)
|
|
||||||
label='Hop #'+(i+1)+' '+response.route[i].city;
|
|
||||||
else if(response.route[i].state)
|
|
||||||
label='Hop #'+(i+1)+' '+response.route[i].state;
|
|
||||||
else if(response.route[i].countryName)
|
|
||||||
label='Hop #'+(i+1)+' '+response.route[i].countryName;
|
|
||||||
else
|
|
||||||
label='Hop #'+(i+1);
|
|
||||||
|
|
||||||
hop.setAttribute('data-ip',response.route[i].ip);
|
|
||||||
hop.setAttribute('tooltiptext','Click for whois');
|
|
||||||
hop.addEventListener("click", function () {
|
|
||||||
mailHopsUtils.launchWhoIs(this.getAttribute('data-ip'));
|
|
||||||
}
|
|
||||||
, false);
|
|
||||||
} else {
|
|
||||||
hop.setAttribute('class','hop');
|
|
||||||
label='Hop #'+(i+1)+' Private';
|
|
||||||
}
|
|
||||||
|
|
||||||
label+=' '+response.route[i].ip;
|
|
||||||
hop.setAttribute('value',label);
|
|
||||||
|
|
||||||
//append the hop
|
|
||||||
this.resultDetails.appendChild(hop);
|
|
||||||
|
|
||||||
//append the host
|
|
||||||
label = '';
|
|
||||||
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;
|
|
||||||
|
|
||||||
if(label !== ''){
|
|
||||||
hop = document.createElement('label');
|
|
||||||
if (message.secure.indexOf(response.route[i].ip) !== -1) {
|
|
||||||
hop.style.backgroundImage = "url('chrome://mailhops/content/images/auth/lock.png')";
|
|
||||||
hop.setAttribute('tooltip','Used TLS or SSL');
|
|
||||||
}
|
|
||||||
hop.setAttribute('class', 'host');
|
|
||||||
hop.setAttribute('value',label);
|
|
||||||
this.resultDetails.appendChild(hop);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (response.route[i].asn) {
|
|
||||||
if (response.route[i].asn.autonomous_system_organization) {
|
|
||||||
hop = document.createElement('label');
|
|
||||||
hop.setAttribute('class', 'host');
|
|
||||||
label = 'ASN Org: ';
|
|
||||||
label = label + response.route[i].asn.autonomous_system_organization;
|
|
||||||
label = label + ' (' + response.route[i].asn.autonomous_system_number + ')';
|
|
||||||
hop.setAttribute('value',label);
|
|
||||||
this.resultDetails.appendChild(hop);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//append weather
|
|
||||||
if(!weatherRoute && !!response.route[i].weather){
|
|
||||||
weatherRoute = response.route[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
//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(weatherRoute){
|
|
||||||
this.mailhopsResultWeather.style.display = 'block';
|
|
||||||
this.mailhopsResultWeather.setAttribute('tooltiptext','Weather in '+weatherRoute.city+' '+weatherRoute.state);
|
|
||||||
this.mailhopsResultWeather.value = weatherRoute.weather.summary+' '+Math.round(weatherRoute.weather.temp)+'\u00B0';
|
|
||||||
this.mailhopsResultWeather.style.backgroundImage = "url('"+mailHopsUtils.getWeatherIcon(weatherRoute.weather.icon)+"')";
|
|
||||||
if(weatherRoute.coords)
|
|
||||||
this.mailhopsResultWeather.setAttribute('href','https://darksky.net/forecast/'+weatherRoute.coords[1]+','+weatherRoute.coords[0]);
|
|
||||||
else if(weatherRoute.lat)
|
|
||||||
this.mailhopsResultWeather.setAttribute('href','https://darksky.net/forecast/'+weatherRoute.lat+','+weatherRoute.lng);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(image.indexOf('local') !== -1) {
|
|
||||||
displayText = ' Local message.';
|
|
||||||
this.mailHopsAccountMessage.style.display = 'none';
|
|
||||||
} 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 && message.time >= 0){
|
|
||||||
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.resultText.setAttribute("data-route", header_route);
|
|
||||||
else
|
|
||||||
this.resultText.removeAttribute("data-route");
|
|
||||||
|
|
||||||
this.resultText.setAttribute('value', displayText+' ( '+distanceText+' )');
|
|
||||||
this.resultText.style.backgroundImage = "url('"+image+"')";
|
|
||||||
|
|
||||||
if(meta && meta.message){
|
|
||||||
this.mailHopsAccountMessage.style.display = 'inline';
|
|
||||||
if(meta.message.text)
|
|
||||||
this.mailHopsAccountMessage.value = meta.message.text;
|
|
||||||
if(meta.message.url)
|
|
||||||
this.mailHopsAccountMessage.setAttribute('href', meta.message.url);
|
|
||||||
} else {
|
|
||||||
this.mailHopsAccountMessage.style.display = 'none';
|
|
||||||
}
|
|
||||||
}, //end route
|
|
||||||
|
|
||||||
toggleMailHopsBar: function(show){
|
|
||||||
if(show && this.mhBox.style.display == 'none')
|
|
||||||
this.mhBox.style.display = '';
|
|
||||||
else if(!show && this.mhBox.style.display == '')
|
|
||||||
this.mhBox.style.display = 'none';
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,512 +0,0 @@
|
|||||||
/*
|
|
||||||
* @author: Andrew Van Tassel
|
|
||||||
* @email: andrew@andrewvantassel.com
|
|
||||||
* @website: http://mailhops.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
var mailHops = {
|
|
||||||
msgURI: null,
|
|
||||||
isLoaded: false,
|
|
||||||
options: {
|
|
||||||
'version':'MailHops Plugin 3.8.1',
|
|
||||||
'lan':'en',
|
|
||||||
'unit':'mi',
|
|
||||||
'api_http':'https://',
|
|
||||||
'api_host':'api.mailhops.com',
|
|
||||||
'debug':false,
|
|
||||||
'hide_compact':false,
|
|
||||||
'bar_color': '#5E7A9B',
|
|
||||||
'font_color': '#ffffff',
|
|
||||||
'font_size': '14px',
|
|
||||||
'country_tag':false,
|
|
||||||
'travel_time_junk':false,
|
|
||||||
'country_filter':[]
|
|
||||||
},
|
|
||||||
message: {
|
|
||||||
secure:[]
|
|
||||||
,time: null
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.LOG = function(msg) {
|
|
||||||
if(!mailHops.options.debug)
|
|
||||||
return;
|
|
||||||
var consoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
|
|
||||||
consoleService.logStringMessage('MailHops: '+msg);
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.init = function() {
|
|
||||||
//load preferences
|
|
||||||
mailHops.loadPref();
|
|
||||||
|
|
||||||
document.getElementById("mailhopsLogo").addEventListener("click", function () {
|
|
||||||
window.openDialog("chrome://mailhops/content/preferences.xul","","chrome, dialog, modal, centerscreen").focus();
|
|
||||||
});
|
|
||||||
|
|
||||||
document.getElementById("mailhopsDataPaneRefresh").addEventListener("click", function () {
|
|
||||||
mailHops.refreshCache();
|
|
||||||
});
|
|
||||||
|
|
||||||
mailHops.isLoaded = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.loadPref = function(reload)
|
|
||||||
{
|
|
||||||
mailHops.LOG('load MailHops prefs');
|
|
||||||
//get preferences
|
|
||||||
mailHops.options.lan = mailHops.getCharPref('mail.mailHops.lang','en');
|
|
||||||
mailHops.options.unit = mailHops.getCharPref('mail.mailHops.unit','mi');
|
|
||||||
mailHops.options.fkey = mailHops.getCharPref('mail.mailHops.fkey','');//forecast.io api_key
|
|
||||||
|
|
||||||
//Display
|
|
||||||
mailHops.options.bar_color = mailHops.getCharPref('mail.mailHops.bar_color','#5E7A9B');
|
|
||||||
|
|
||||||
mailHops.options.font_color = mailHops.getCharPref('mail.mailHops.font_color','#ffffff');
|
|
||||||
|
|
||||||
mailHops.options.font_size = mailHops.getCharPref('mail.mailHops.font_size','14px');
|
|
||||||
|
|
||||||
mailHops.options.debug = mailHops.getCharPref('mail.mailHops.debug','false')=='true'?true:false;
|
|
||||||
|
|
||||||
mailHops.options.hide_compact = mailHops.getCharPref('mail.mailHops.hide_compact','false')=='true'?true:false;
|
|
||||||
|
|
||||||
mailHops.options.api_host = mailHops.getCharPref('mail.mailHops.api_host','api.mailhops.com');
|
|
||||||
|
|
||||||
mailHops.options.api_http = mailHops.getCharPref('mail.mailHops.api_http','https://');
|
|
||||||
|
|
||||||
mailHops.options.api_key = mailHops.getCharPref('mail.mailHops.api_key','');
|
|
||||||
|
|
||||||
mailHops.options.map_provider = mailHops.getCharPref('mail.mailHops.map_provider','OpenStreetMap.Mapnik');
|
|
||||||
|
|
||||||
mailHops.options.country_tag = mailHops.getCharPref('mail.mailHops.country_tag','false')=='true'?true:false;
|
|
||||||
|
|
||||||
mailHops.options.travel_time_junk = mailHops.getCharPref('mail.mailHops.travel_time_junk','false')=='true'?true:false;
|
|
||||||
|
|
||||||
mailHops.options.country_filter = mailHops.getCharPref('mail.mailHops.country_filter',[]);
|
|
||||||
|
|
||||||
//init display
|
|
||||||
mailHopsDisplay.init( mailHops.options, reload );
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.StreamListener =
|
|
||||||
{
|
|
||||||
content: "" ,
|
|
||||||
found: false ,
|
|
||||||
onDataAvailable: function ( request, inputStream, offset, count )
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
var sis = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance ( Components.interfaces.nsIScriptableInputStream ) ;
|
|
||||||
sis.init( inputStream ) ;
|
|
||||||
|
|
||||||
if( !this.found )
|
|
||||||
{
|
|
||||||
this.content += sis.read ( count ) ;
|
|
||||||
this.content = this.content.replace ( /\r/g , "" ) ;
|
|
||||||
var pos = this.content.indexOf ( "\n\n" ) ;
|
|
||||||
|
|
||||||
if ( pos > -1 )
|
|
||||||
{
|
|
||||||
// last header line must end with LF -> pos+1 !!!
|
|
||||||
this.content = this.content.substr ( 0 , pos + 1 ) ;
|
|
||||||
this.found = true ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch(e) {
|
|
||||||
//failed to read input stream
|
|
||||||
mailHops.LOG('StreamListener Error: '+JSON.stringify(e));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onStartRequest: function ( request )
|
|
||||||
{
|
|
||||||
this.content = "" ;
|
|
||||||
this.found = false ;
|
|
||||||
},
|
|
||||||
onStopRequest: function ( aRequest , aStatusCode )
|
|
||||||
{
|
|
||||||
mailHops.headers = Components.classes["@mozilla.org/messenger/mimeheaders;1"].createInstance ( Components.interfaces.nsIMimeHeaders ) ;
|
|
||||||
mailHops.headers.initialize(this.content, this.content.length);
|
|
||||||
mailHops.headerData = this.content;
|
|
||||||
mailHops.getRoute();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* loop through the header, find out if we have received-from headers
|
|
||||||
*/
|
|
||||||
mailHops.loadHeaderData = function() {
|
|
||||||
|
|
||||||
if(!!mailHops.options.hide_compact){
|
|
||||||
// CompactHeader toggle header logic
|
|
||||||
var compactHeadersView = document.getElementById('CompactHeader_collapsedHeaderView');
|
|
||||||
if(!!compactHeadersView){
|
|
||||||
if(compactHeadersView.collapsed===true){
|
|
||||||
mailHopsDisplay.toggleMailHopsBar(true);
|
|
||||||
} else if(compactHeadersView.collapsed===false){
|
|
||||||
mailHopsDisplay.toggleMailHopsBar(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var msgURI = null ;
|
|
||||||
|
|
||||||
if ( gDBView ){
|
|
||||||
msgURI = gDBView.URIForFirstSelectedMessage;
|
|
||||||
}
|
|
||||||
if ( msgURI == null ){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mailHops.msgURI = msgURI;
|
|
||||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance ( Components.interfaces.nsIMessenger ) ;
|
|
||||||
var msgService = messenger.messageServiceFromURI ( msgURI ) ;
|
|
||||||
msgService.CopyMessage ( msgURI , mailHops.StreamListener , false , null , msgWindow , {} ) ;
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.getRoute = function(){
|
|
||||||
//IP regex
|
|
||||||
var regexIp=/(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)\.(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)\.(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)\.(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)(\/(?:[012]\d?|3[012]?|[456789])){0,1}$/;
|
|
||||||
var regexAllIp = /(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)\.(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)\.(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)\.(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)(\/(?:[012]\d?|3[012]?|[456789])){0,1}/g;
|
|
||||||
var regexIPV6 = /s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*/g;
|
|
||||||
|
|
||||||
var headReceived = mailHops.headers.extractHeader ( "Received" , true );
|
|
||||||
var headDate = mailHops.headers.extractHeader ( "Date" , true );
|
|
||||||
var headXReceived = mailHops.headers.extractHeader ( "X-Received" , false );
|
|
||||||
var headXOrigIP = mailHops.headers.extractHeader ( "X-Originating-IP" , false );
|
|
||||||
// auth box
|
|
||||||
var headXMailer = mailHops.headers.extractHeader ( "X-Mailer" , false );
|
|
||||||
var headUserAgent = mailHops.headers.extractHeader ( "User-Agent" , false );
|
|
||||||
var headXMimeOLE = mailHops.headers.extractHeader ( "X-MimeOLE" , false );
|
|
||||||
var headReceivedSPF = mailHops.headers.extractHeader ( "Received-SPF" , false );
|
|
||||||
var headAuth = mailHops.headers.extractHeader ( "Authentication-Results" , false );
|
|
||||||
var headListUnsubscribe = mailHops.headers.extractHeader ( "List-Unsubscribe" , false ) ;
|
|
||||||
|
|
||||||
var all_ips = new Array();
|
|
||||||
var rline = '',firstDate=headDate,lastDate;
|
|
||||||
//empty secure and time
|
|
||||||
mailHops.message.secure = [];
|
|
||||||
mailHops.message.time = null;
|
|
||||||
|
|
||||||
mailHopsDisplay.lists( headListUnsubscribe );
|
|
||||||
|
|
||||||
mailHopsDisplay.auth( headXMailer, headUserAgent, headXMimeOLE, headAuth, headReceivedSPF );
|
|
||||||
|
|
||||||
//loop through the received headers and parse for IP addresses
|
|
||||||
if (!!headReceived){
|
|
||||||
var received_ips = new Array();
|
|
||||||
var headReceivedArr = headReceived.split('\n');
|
|
||||||
for( var h=0; h < headReceivedArr.length; h++ ) {
|
|
||||||
//build the received line by concat until semi-colon ; date/time
|
|
||||||
rline += headReceivedArr[h];
|
|
||||||
if(headReceivedArr[h].indexOf(';') === -1)
|
|
||||||
continue;
|
|
||||||
// first and last dates are used to calculate time traveled
|
|
||||||
if(rline.indexOf(';') !== -1){
|
|
||||||
if(!firstDate)
|
|
||||||
firstDate = rline.substring(rline.indexOf(';')+1).trim();
|
|
||||||
if(!lastDate)
|
|
||||||
lastDate = rline.substring(rline.indexOf(';')+1).trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
// IPV6 check
|
|
||||||
rline = rline.replace(/\[IPv6\:/g,'[');
|
|
||||||
if(rline.match(regexIPV6)){
|
|
||||||
all_ips.unshift( rline.match(regexIPV6)[0] );
|
|
||||||
//reset the line
|
|
||||||
rline='';
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// parse IPs out of Received line
|
|
||||||
received_ips = rline.match(regexAllIp);
|
|
||||||
//continue if no IPs found
|
|
||||||
if(!received_ips){
|
|
||||||
//reset the line
|
|
||||||
rline='';
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
//get unique IPs for each Received header
|
|
||||||
received_ips = received_ips.filter(function(item, pos) {
|
|
||||||
return received_ips.indexOf(item) === pos;
|
|
||||||
});
|
|
||||||
for( var r=received_ips.length; r >= 0 ; r-- ){
|
|
||||||
if(regexIp.test(received_ips[r]) && mailHops.testIP(received_ips[r],rline)){
|
|
||||||
all_ips.unshift( received_ips[r] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//reset the line
|
|
||||||
rline='';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// parse dates
|
|
||||||
if(firstDate && firstDate.indexOf('(') !==- 1)
|
|
||||||
firstDate = firstDate.substring(0,firstDate.indexOf('(')).trim();
|
|
||||||
if(lastDate && lastDate.indexOf('(') !== -1)
|
|
||||||
lastDate = lastDate.substring(0,lastDate.indexOf('(')).trim();
|
|
||||||
if(firstDate && lastDate){
|
|
||||||
try {
|
|
||||||
firstDate = new Date(firstDate);
|
|
||||||
lastDate = new Date(lastDate);
|
|
||||||
mailHops.message.time = lastDate - firstDate;
|
|
||||||
} catch(e){
|
|
||||||
mailHops.LOG('travel dates parse Error: '+JSON.stringify(e));
|
|
||||||
mailHops.message.time = null;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mailHops.message.time = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
//get the originating IP address
|
|
||||||
if(!!headXOrigIP){
|
|
||||||
headXOrigIP = headXOrigIP.replace(/\[IPv6\:/g,'[');
|
|
||||||
//IPV6 check
|
|
||||||
if(headXOrigIP.match(regexIPV6)){
|
|
||||||
var ip = headXOrigIP.match(regexIPV6)
|
|
||||||
if(!!ip && ip.length && all_ips.indexOf(ip[0])==-1)
|
|
||||||
all_ips.unshift( ip[0] );
|
|
||||||
} else {
|
|
||||||
var ip = headXOrigIP.match(regexAllIp);
|
|
||||||
if(!!ip && ip.length && all_ips.indexOf(ip[0])==-1)
|
|
||||||
all_ips.unshift( ip[0] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( all_ips.length ){
|
|
||||||
mailHops.lookupRoute ( all_ips ) ;
|
|
||||||
} else {
|
|
||||||
mailHopsDisplay.clear( true );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//another ip check, dates will throw off the regex
|
|
||||||
mailHops.testIP = function(ip,header){
|
|
||||||
var validIP = true;
|
|
||||||
|
|
||||||
try {
|
|
||||||
var firstchar = header.substring(header.indexOf(ip)-1);
|
|
||||||
firstchar = firstchar.substring(0,1);
|
|
||||||
var lastchar = header.substring((header.indexOf(ip)+ip.length));
|
|
||||||
lastchar = lastchar.substring(0,1);
|
|
||||||
|
|
||||||
if(firstchar.match(/\.|\d|\-/)
|
|
||||||
|| lastchar.match(/\.|\d|\-/)
|
|
||||||
|| ( firstchar == '?' && lastchar == '?' )
|
|
||||||
|| (firstchar == ':' || lastchar == ':')
|
|
||||||
|| lastchar == ';'
|
|
||||||
|| header.toLowerCase().indexOf(' id '+ip) !== -1
|
|
||||||
|| parseInt(ip.substring(0,ip.indexOf('.'))) >= 240 //IANA-RESERVED
|
|
||||||
){
|
|
||||||
//only if there is one instance of this IP
|
|
||||||
if(header.indexOf(ip) == header.lastIndexOf(ip))
|
|
||||||
validIP = false;
|
|
||||||
} else if(header.indexOf('using SSL') !== -1
|
|
||||||
|| header.indexOf('using TLS') !== -1
|
|
||||||
|| header.indexOf('version=TLSv1/SSLv3') !== -1
|
|
||||||
){
|
|
||||||
//check if this IP was part of a secure transmission
|
|
||||||
mailHops.message.secure.push(ip);
|
|
||||||
}
|
|
||||||
} catch(e) {
|
|
||||||
mailHops.LOG('testIP Error: '+JSON.stringify(e));
|
|
||||||
}
|
|
||||||
return validIP;
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.setupEventListener = function () {
|
|
||||||
if ( mailHops.isLoaded ){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mailHops.LOG("Setting up Message listener");
|
|
||||||
|
|
||||||
mailHops.init();
|
|
||||||
mailHops.registerObserver();
|
|
||||||
|
|
||||||
var listener = {
|
|
||||||
onStartHeaders: function() { mailHopsDisplay.clear(); }
|
|
||||||
, onEndHeaders: mailHops.loadHeaderData
|
|
||||||
};
|
|
||||||
gMessageListeners.push( listener );
|
|
||||||
};
|
|
||||||
|
|
||||||
//preferences observers
|
|
||||||
mailHops.registerObserver = function(){
|
|
||||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService ( Ci.nsIPrefService ) ;
|
|
||||||
mailHops._branch = prefService.getBranch("mail.mailHops.");
|
|
||||||
if (!("addObserver" in mailHops._branch))
|
|
||||||
mailHops._branch.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
|
||||||
|
|
||||||
mailHops._branch.addObserver( "" , mailHops , false ) ;
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.unregisterObserver = function(){
|
|
||||||
if ( !mailHops._branch ){
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
mailHops._branch.removeObserver ( "" , mailHops ) ;
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.observe = function ( aSubject , aTopic , aData )
|
|
||||||
{
|
|
||||||
if ( aTopic == "nsPref:changed" )
|
|
||||||
mailHops.loadPref(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.getCharPref = function ( strName , strDefault ){
|
|
||||||
var value;
|
|
||||||
if (!pref){
|
|
||||||
var pref = Components.classes["@mozilla.org/preferences-service;1"].getService( Ci.nsIPrefBranch ) ;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
value = pref.getCharPref ( strName ) ;
|
|
||||||
} catch(e){
|
|
||||||
value = strDefault ;
|
|
||||||
}
|
|
||||||
return ( value ) ;
|
|
||||||
};
|
|
||||||
|
|
||||||
//mailhops lookup
|
|
||||||
mailHops.lookupRoute = function(header_route){
|
|
||||||
|
|
||||||
//setup loading
|
|
||||||
mailHopsDisplay.clear();
|
|
||||||
|
|
||||||
var lookupURL = mailHopsUtils.getAPIUrl(mailHops.options)+'/lookup/?'+mailHopsUtils.getAPIUrlParams(mailHops.options)+'&r='+String(header_route)+'&l='+mailHops.options.lan+'&u='+mailHops.options.unit;
|
|
||||||
|
|
||||||
if(mailHops.options.fkey != '')
|
|
||||||
lookupURL += '&fkey='+mailHops.options.fkey;
|
|
||||||
if(mailHops.message.time != null)
|
|
||||||
lookupURL += '&t='+mailHops.message.time;
|
|
||||||
|
|
||||||
//check for cache
|
|
||||||
var cached_results = mailHops.getResults();
|
|
||||||
|
|
||||||
if(cached_results){
|
|
||||||
mailHops.LOG('Found Cached Result');
|
|
||||||
try {
|
|
||||||
cached_results = JSON.parse(cached_results);
|
|
||||||
mailHopsDisplay.route(header_route, mailHops.message, cached_results.response, cached_results.meta, lookupURL);
|
|
||||||
return;
|
|
||||||
} catch(e){
|
|
||||||
mailHops.LOG('Failed to parse cached result: '+JSON.stringify(e));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mailHops.LOG(lookupURL);
|
|
||||||
|
|
||||||
//call mailhops api for lookup
|
|
||||||
var xmlhttp = new XMLHttpRequest();
|
|
||||||
|
|
||||||
xmlhttp.open("GET", lookupURL ,true);
|
|
||||||
xmlhttp.onreadystatechange=function() {
|
|
||||||
if (xmlhttp.readyState===4){
|
|
||||||
try {
|
|
||||||
var data = JSON.parse(xmlhttp.responseText);
|
|
||||||
if(xmlhttp.status===200){
|
|
||||||
var d = new Date();
|
|
||||||
data.meta.cached = d.toISOString();
|
|
||||||
//save the result
|
|
||||||
mailHops.saveResults(data, data.response.route);
|
|
||||||
//display the result
|
|
||||||
mailHopsDisplay.route(header_route, mailHops.message, data.response, data.meta, lookupURL);
|
|
||||||
} else if(data.error){
|
|
||||||
mailHops.LOG(JSON.stringify(data));
|
|
||||||
//display the error
|
|
||||||
mailHopsDisplay.error(xmlhttp.status,data);
|
|
||||||
}
|
|
||||||
} catch(e){
|
|
||||||
mailHops.LOG(e);
|
|
||||||
mailHopsDisplay.error();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
xmlhttp.send(null);
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.saveResults = function(results, route){
|
|
||||||
|
|
||||||
if(!mailHops.msgURI)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance().QueryInterface(Components.interfaces.nsIMessenger);
|
|
||||||
var msgHdr = messenger.messageServiceFromURI(mailHops.msgURI).messageURIToMsgHdr(mailHops.msgURI);
|
|
||||||
|
|
||||||
if(!msgHdr)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!results){
|
|
||||||
msgHdr.setStringProperty( "MH-Route", '' );
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var countryCode = mailHopsUtils.getOriginatingCountryCode(route);
|
|
||||||
|
|
||||||
if(!!countryCode){
|
|
||||||
results.sender = { countryCode: countryCode };
|
|
||||||
}
|
|
||||||
|
|
||||||
msgHdr.setStringProperty( "MH-Route", JSON.stringify(results) );
|
|
||||||
|
|
||||||
//Add tag
|
|
||||||
if(!!countryCode && !!mailHops.options.api_key){
|
|
||||||
try {
|
|
||||||
var msg = Components.classes["@mozilla.org/array;1"].createInstance(Components.interfaces.nsIMutableArray);
|
|
||||||
msg.clear();
|
|
||||||
msg.appendElement(msgHdr, false);
|
|
||||||
|
|
||||||
if(!!mailHops.options.country_tag){
|
|
||||||
var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"].getService(Components.interfaces.nsIMsgTagService);
|
|
||||||
if(!tagService)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(!tagService.getKeyForTag(countryCode))
|
|
||||||
tagService.addTag(countryCode,'',0);
|
|
||||||
|
|
||||||
msgHdr.folder.addKeywordsToMessages(msg, countryCode );
|
|
||||||
mailHops.LOG( "Added CountryCode tag: "+countryCode );
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!!mailHops.options.country_filter && mailHops.options.country_filter.length){
|
|
||||||
if(mailHops.options.country_filter.indexOf(countryCode.toLowerCase()) !== -1){
|
|
||||||
msgHdr.folder.setJunkScoreForMessages(msg, "100");
|
|
||||||
mailHops.LOG( "Junk: Country Filter match" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// tag as junk if travel time is longer than 10 seconds
|
|
||||||
if(!!mailHops.options.travel_time_junk && mailHops.message.time != null && mailHops.message.time > 10000){
|
|
||||||
msgHdr.folder.setJunkScoreForMessages(msg, "100");
|
|
||||||
mailHops.LOG( "Junk: Travel time match" );
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(e){
|
|
||||||
mailHops.LOG( "Error adding CountryCode tag: "+e );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.getResults = function(){
|
|
||||||
|
|
||||||
if(!mailHops.msgURI)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance().QueryInterface(Components.interfaces.nsIMessenger);
|
|
||||||
var msgHdr = messenger.messageServiceFromURI(mailHops.msgURI).messageURIToMsgHdr(mailHops.msgURI);
|
|
||||||
|
|
||||||
if(!msgHdr)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return msgHdr.getStringProperty( "MH-Route" );
|
|
||||||
};
|
|
||||||
|
|
||||||
mailHops.refreshCache = function(){
|
|
||||||
mailHops.saveResults();
|
|
||||||
mailHops.getRoute();
|
|
||||||
};
|
|
||||||
|
|
||||||
// window.addEventListener("messagepane-loaded", mailHops.setupEventListener, true);
|
|
||||||
window.addEventListener("load", function() {
|
|
||||||
var messagepane = document.getElementById("messagepane");
|
|
||||||
if (messagepane) {
|
|
||||||
messagepane.addEventListener("load", function () {
|
|
||||||
mailHops.setupEventListener();
|
|
||||||
}, true);
|
|
||||||
}
|
|
||||||
}, false);
|
|
@ -1,272 +0,0 @@
|
|||||||
if (!pref) {
|
|
||||||
var pref = Components.classes["@mozilla.org/preferences-service;1"].getService ( Ci.nsIPrefBranch ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
var mailHopPreferences = {
|
|
||||||
api_host: 'api.mailhops.com', //mailhops api url
|
|
||||||
api_http: 'https://', //ssl?
|
|
||||||
api_key: '', //api key
|
|
||||||
valid_api_key: false,
|
|
||||||
fkey: '', //forecast.io api key
|
|
||||||
country_filter: [],
|
|
||||||
previewBar: null,
|
|
||||||
|
|
||||||
loadPreferences: function(){
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
this.api_host = document.getElementById("mailhop.api_host");
|
|
||||||
|
|
||||||
this.api_http = document.getElementById("mailhop.api_http");
|
|
||||||
|
|
||||||
this.api_key = document.getElementById("mailhop.api_key");
|
|
||||||
|
|
||||||
this.fkey = document.getElementById("mailhop.fkey");
|
|
||||||
|
|
||||||
this.previewBar = document.getElementById("display_preview");
|
|
||||||
|
|
||||||
document.getElementById("mailhop.lang").value = pref.getCharPref("mail.mailHops.lang",'en');
|
|
||||||
|
|
||||||
document.getElementById("mailhop.map_provider").value = pref.getCharPref("mail.mailHops.map_provider",'OpenStreetMap.Mapnik');
|
|
||||||
|
|
||||||
if(pref.getCharPref("mail.mailHops.unit",'mi')=='mi')
|
|
||||||
document.getElementById("mailhop.unit").selectedIndex = 0;
|
|
||||||
else
|
|
||||||
document.getElementById("mailhop.unit").selectedIndex = 1;
|
|
||||||
|
|
||||||
//Display Box styles
|
|
||||||
document.getElementById("mailhop.bar_color").value = pref.getCharPref("mail.mailHops.bar_color",'#FFF');
|
|
||||||
document.getElementById("mailhop.font_color").value = pref.getCharPref("mail.mailHops.font_color",'#777');
|
|
||||||
document.getElementById("mailhop.font_size").value = pref.getCharPref("mail.mailHops.font_size",'14px');
|
|
||||||
|
|
||||||
//Update styles
|
|
||||||
this.previewBar.style.background = document.getElementById("mailhop.bar_color").value;
|
|
||||||
this.previewBar.style.color = document.getElementById("mailhop.font_color").value;
|
|
||||||
this.previewBar.style.fontSize = document.getElementById("mailhop.font_size").value;
|
|
||||||
|
|
||||||
if(pref.getCharPref("mail.mailHops.debug",'true')=='true')
|
|
||||||
document.getElementById("mailhop.debug").checked = true;
|
|
||||||
else
|
|
||||||
document.getElementById("mailhop.debug").checked = false;
|
|
||||||
|
|
||||||
// API info
|
|
||||||
this.api_key.value = pref.getCharPref("mail.mailHops.api_key",'');
|
|
||||||
|
|
||||||
this.api_http.value = pref.getCharPref("mail.mailHops.api_http",'https://');
|
|
||||||
if(this.api_http.value=='https://')
|
|
||||||
this.api_http.selectedIndex = 0;
|
|
||||||
else
|
|
||||||
this.api_http.selectedIndex = 1;
|
|
||||||
|
|
||||||
this.api_host.value = pref.getCharPref("mail.mailHops.api_host",'api.mailhops.com');
|
|
||||||
|
|
||||||
this.fkey.value = pref.getCharPref("mail.mailHops.fkey",'');
|
|
||||||
|
|
||||||
// Country Filter and tagging
|
|
||||||
this.country_filter = JSON.parse(pref.getCharPref("mail.mailHops.country_filter",null) || []);
|
|
||||||
if(this.country_filter.length){
|
|
||||||
for(c in this.country_filter){
|
|
||||||
document.getElementById("country_"+this.country_filter[c]).checked=true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!!this.api_key.value.trim()){
|
|
||||||
document.getElementById("mailhops-membership-link").value='My Account';
|
|
||||||
document.getElementById("mailhops-membership-link").setAttribute('href','https://mailhops.com/account/'+this.api_key.value.trim());
|
|
||||||
}
|
|
||||||
if(pref.getCharPref("mail.mailHops.country_tag",'false')=='false')
|
|
||||||
document.getElementById("mailhop.country_tag").checked = false;
|
|
||||||
else
|
|
||||||
document.getElementById("mailhop.country_tag").checked = true;
|
|
||||||
|
|
||||||
if(pref.getCharPref("mail.mailHops.travel_time_junk",'false')=='false')
|
|
||||||
document.getElementById("mailhop.travel_time_junk").checked = false;
|
|
||||||
else
|
|
||||||
document.getElementById("mailhop.travel_time_junk").checked = true;
|
|
||||||
|
|
||||||
if(pref.getCharPref("mail.mailHops.hide_compact",'false')=='false')
|
|
||||||
document.getElementById("mailhop.hide_compact").checked = false;
|
|
||||||
else
|
|
||||||
document.getElementById("mailhop.hide_compact").checked = true;
|
|
||||||
|
|
||||||
this.saveAPIKey();
|
|
||||||
|
|
||||||
document.getElementById("mailhop.bar_color").addEventListener("input", function () {
|
|
||||||
self.previewBar.style.background = this.value;
|
|
||||||
});
|
|
||||||
document.getElementById("mailhop.font_color").addEventListener("input", function () {
|
|
||||||
self.previewBar.style.color = this.value;
|
|
||||||
});
|
|
||||||
document.getElementById("mailhop.font_size").addEventListener("input", function () {
|
|
||||||
self.previewBar.style.fontSize = this.value;
|
|
||||||
});
|
|
||||||
document.addEventListener("dialogaccept", function(event) {
|
|
||||||
mailHopPreferences.savePreferences();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
savePreferences: function() {
|
|
||||||
pref.setCharPref("mail.mailHops.lang", document.getElementById("mailhop.lang").selectedItem.value);
|
|
||||||
pref.setCharPref("mail.mailHops.map_provider", document.getElementById("mailhop.map_provider").selectedItem.value);
|
|
||||||
pref.setCharPref("mail.mailHops.unit", document.getElementById("mailhop.unit").selectedItem.value);
|
|
||||||
pref.setCharPref("mail.mailHops.bar_color", String(document.getElementById("mailhop.bar_color").value));
|
|
||||||
pref.setCharPref("mail.mailHops.font_color", String(document.getElementById("mailhop.font_color").value));
|
|
||||||
pref.setCharPref("mail.mailHops.font_size", String(document.getElementById("mailhop.font_size").value));
|
|
||||||
pref.setCharPref("mail.mailHops.debug", String(document.getElementById("mailhop.debug").checked));
|
|
||||||
pref.setCharPref("mail.mailHops.hide_compact", String(document.getElementById("mailhop.hide_compact").checked));
|
|
||||||
|
|
||||||
//API vars
|
|
||||||
if(!this.valid_api_key)
|
|
||||||
this.api_key.value='';
|
|
||||||
pref.setCharPref("mail.mailHops.api_key", this.api_key.value.trim());
|
|
||||||
pref.setCharPref("mail.mailHops.api_http", this.api_http.value);
|
|
||||||
pref.setCharPref("mail.mailHops.api_host", this.api_host.value);
|
|
||||||
|
|
||||||
pref.setCharPref("mail.mailHops.fkey", String(this.fkey.value));
|
|
||||||
|
|
||||||
// Country Filter and tagging
|
|
||||||
this.country_filter = [];
|
|
||||||
for(c in mailHopsUtils.countries){
|
|
||||||
if(document.getElementById("country_"+mailHopsUtils.countries[c]).checked)
|
|
||||||
this.country_filter.push(document.getElementById("country_"+mailHopsUtils.countries[c]).getAttribute('value'));
|
|
||||||
}
|
|
||||||
pref.setCharPref("mail.mailHops.country_filter", String(JSON.stringify(this.country_filter)));
|
|
||||||
pref.setCharPref("mail.mailHops.country_tag", String(document.getElementById("mailhop.country_tag").checked));
|
|
||||||
pref.setCharPref("mail.mailHops.travel_time_junk", String(document.getElementById("mailhop.travel_time_junk").checked));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
countryListSelectAll: function(all){
|
|
||||||
if(this.valid_api_key){
|
|
||||||
for(c in mailHopsUtils.countries){
|
|
||||||
document.getElementById("country_"+mailHopsUtils.countries[c]).checked=all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
planError: function(error){
|
|
||||||
this.valid_api_key=false;
|
|
||||||
document.getElementById("plan-error").style.display = 'block';
|
|
||||||
document.getElementById("plan-error").value=error;
|
|
||||||
document.getElementById("plan").value='';
|
|
||||||
document.getElementById("status").value='';
|
|
||||||
document.getElementById("rate-limit").value='';
|
|
||||||
document.getElementById("rate-remaining").value='';
|
|
||||||
document.getElementById("rate-reset").value='';
|
|
||||||
document.getElementById("mailhops-membership-link").value='Join MailHops';
|
|
||||||
document.getElementById("mailhops-membership-link").setAttribute('href','https://mailhops.com');
|
|
||||||
var items = document.getElementsByClassName('filters');
|
|
||||||
for(x in items){
|
|
||||||
items[x].disabled = true;
|
|
||||||
}
|
|
||||||
var items = document.getElementsByClassName('country');
|
|
||||||
for(x in items){
|
|
||||||
items[x].disabled = true;
|
|
||||||
if(items[x].label)
|
|
||||||
items[x].label = items[x].label.toUpperCase();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
saveAPIKey: function() {
|
|
||||||
|
|
||||||
if(!!this.api_key && this.api_key.value != ''){
|
|
||||||
var xmlhttp = new XMLHttpRequest();
|
|
||||||
var apiBase = this.api_http.value+this.api_host.value,
|
|
||||||
accountURL = '/v2/accounts/?api_key='+this.api_key.value.trim(),
|
|
||||||
api_key = this.api_key.value.trim(),
|
|
||||||
self = this;
|
|
||||||
|
|
||||||
xmlhttp.open("GET", apiBase+accountURL, true);
|
|
||||||
xmlhttp.onreadystatechange=function() {
|
|
||||||
if (xmlhttp.readyState===4) {
|
|
||||||
try {
|
|
||||||
var data = JSON.parse(xmlhttp.responseText);
|
|
||||||
if(xmlhttp.status===200){
|
|
||||||
self.valid_api_key=true;
|
|
||||||
document.getElementById("plan-error").style.display = 'none';
|
|
||||||
// set plan info
|
|
||||||
document.getElementById("plan").value = "Plan: "+data.account.subscriptions.data[0].plan.name;
|
|
||||||
document.getElementById("status").value = "Status: "+data.account.subscriptions.data[0].status;
|
|
||||||
document.getElementById("rate-limit").value = "Limit: "+data.account.rate.limit;
|
|
||||||
document.getElementById("rate-remaining").value = "Remaining: "+data.account.rate.remaining;
|
|
||||||
if(data.account.rate.reset/60 < 60)
|
|
||||||
document.getElementById("rate-reset").value = "Resets in: "+Math.round(data.account.rate.reset/60)+" min.";
|
|
||||||
else
|
|
||||||
document.getElementById("rate-reset").value = "Resets in: "+Math.round(data.account.rate.reset/60/60)+" hr.";
|
|
||||||
document.getElementById("mailhops-membership-link").value='My Account';
|
|
||||||
document.getElementById("mailhops-membership-link").setAttribute('href','https://mailhops.com/account/'+api_key);
|
|
||||||
|
|
||||||
var items = document.getElementsByClassName('filters');
|
|
||||||
for(x in items){ items[x].disabled = false;}
|
|
||||||
var items = document.getElementsByClassName('country');
|
|
||||||
for(x in items){ items[x].disabled = false; if(items[x].label) items[x].label = items[x].label.toUpperCase();}
|
|
||||||
} else if(!!data.error){
|
|
||||||
self.planError(xmlhttp.status+': '+data.error.message);
|
|
||||||
}
|
|
||||||
mailHopPreferences.savePreferences();
|
|
||||||
} catch (e){
|
|
||||||
self.planError('Connection Failed to\n '+e+'!');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
xmlhttp.send(null);
|
|
||||||
} else {
|
|
||||||
this.planError('Enter a valid API key above.');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
TestConnection: function(){
|
|
||||||
var xmlhttp = new XMLHttpRequest();
|
|
||||||
var apiBase = this.api_http.value+this.api_host.value,
|
|
||||||
lookupURL = '/v1/lookup/?healthcheck';
|
|
||||||
|
|
||||||
xmlhttp.open("GET", apiBase+lookupURL,true);
|
|
||||||
xmlhttp.onreadystatechange=function() {
|
|
||||||
if (xmlhttp.readyState===4) {
|
|
||||||
try{
|
|
||||||
var data = JSON.parse(xmlhttp.responseText);
|
|
||||||
if(xmlhttp.status===200){
|
|
||||||
alert('Connection Succeeded to\n '+apiBase+'!');
|
|
||||||
} else {
|
|
||||||
//display the error
|
|
||||||
alert('Connection Failed to\n '+apiBase+'!');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (ex){
|
|
||||||
alert('Connection Failed to\n '+apiBase+'! '+JSON.stringify(ex));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
xmlhttp.send(null);
|
|
||||||
},
|
|
||||||
|
|
||||||
ResetConnection: function(){
|
|
||||||
this.api_http.value=="https://";
|
|
||||||
this.api_http.selectedIndex = 0;
|
|
||||||
this.api_host.value='api.mailhops.com';
|
|
||||||
},
|
|
||||||
|
|
||||||
ResetDisplay: function(bar,font,size){
|
|
||||||
if(bar){
|
|
||||||
if(bar.indexOf('rgb(')===0)
|
|
||||||
document.getElementById("mailhop.bar_color").value = this.rgb2hex(bar);
|
|
||||||
else
|
|
||||||
document.getElementById("mailhop.bar_color").value = bar;
|
|
||||||
}
|
|
||||||
if(font) {
|
|
||||||
if(font.indexOf('rgb(')===0)
|
|
||||||
document.getElementById("mailhop.font_color").value = this.rgb2hex(font);
|
|
||||||
else
|
|
||||||
document.getElementById("mailhop.font_color").value = font;
|
|
||||||
}
|
|
||||||
if(size) document.getElementById("mailhop.font_size").value = size;
|
|
||||||
this.previewBar.style.background = document.getElementById("mailhop.bar_color").value;
|
|
||||||
this.previewBar.style.color = document.getElementById("mailhop.font_color").value;
|
|
||||||
this.previewBar.style.fontSize = document.getElementById("mailhop.font_size").value;
|
|
||||||
},
|
|
||||||
|
|
||||||
rgb2hex: function(rgb) {
|
|
||||||
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
|
||||||
function hex(x) {
|
|
||||||
return ("0" + parseInt(x).toString(16)).slice(-2);
|
|
||||||
}
|
|
||||||
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
@ -1,75 +0,0 @@
|
|||||||
var columnHandler = {
|
|
||||||
getCellText: function(row, col) {return null;},
|
|
||||||
getSortStringForRow: function(msgHdr) {
|
|
||||||
msgHdr.getStringProperty( "MH-Route" );
|
|
||||||
var countryCode = null;
|
|
||||||
var cached_results = msgHdr.getStringProperty( "MH-Route" );
|
|
||||||
if(cached_results){
|
|
||||||
try {
|
|
||||||
cached_results = JSON.parse(cached_results);
|
|
||||||
if(cached_results.sender && cached_results.sender.countryCode){
|
|
||||||
countryCode = cached_results.sender.countryCode;
|
|
||||||
} else {
|
|
||||||
countryCode = mailHopsUtils.getOriginatingCountryCode(cached_results.response.route);
|
|
||||||
}
|
|
||||||
if(countryCode){
|
|
||||||
return 'chrome://mailhops/content/images/flags/'+countryCode.toLowerCase()+'.png';
|
|
||||||
}
|
|
||||||
} catch(e) {
|
|
||||||
return countryCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return countryCode;
|
|
||||||
},
|
|
||||||
isString: function() {return true;},
|
|
||||||
|
|
||||||
getCellProperties: function (row, col, props) {
|
|
||||||
return 'colMailHops';
|
|
||||||
},
|
|
||||||
getRowProperties: function(row, props){},
|
|
||||||
getImageSrc: function (row, col) {
|
|
||||||
var msgKey = gDBView.getKeyAt(row);
|
|
||||||
var msgHdr = gDBView.db.GetMsgHdrForKey(msgKey);
|
|
||||||
var countryCode = null;
|
|
||||||
var cached_results = msgHdr.getStringProperty( "MH-Route" );
|
|
||||||
if(cached_results){
|
|
||||||
try {
|
|
||||||
cached_results = JSON.parse(cached_results);
|
|
||||||
if(cached_results.sender && cached_results.sender.countryCode){
|
|
||||||
countryCode = cached_results.sender.countryCode;
|
|
||||||
} else {
|
|
||||||
countryCode = mailHopsUtils.getOriginatingCountryCode(cached_results.response.route);
|
|
||||||
}
|
|
||||||
if(countryCode){
|
|
||||||
return 'chrome://mailhops/content/images/flags/'+countryCode.toLowerCase()+'.png';
|
|
||||||
}
|
|
||||||
} catch(e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
getSortLongForRow: function(hdr) {return 0;}
|
|
||||||
};
|
|
||||||
|
|
||||||
var CreateDbObserver = {
|
|
||||||
// Components.interfaces.nsIObserver
|
|
||||||
observe: function(aMsgFolder, aTopic, aData)
|
|
||||||
{
|
|
||||||
addCustomColumnHandler();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function doOnceLoaded() {
|
|
||||||
var ObserverService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
|
||||||
ObserverService.addObserver(CreateDbObserver, "MsgCreateDBView", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
function addCustomColumnHandler() {
|
|
||||||
gDBView.addColumnHandler("colMailHops", columnHandler);
|
|
||||||
if ("COLUMNS_MAP_NOSORT" in gFolderDisplay) {
|
|
||||||
gFolderDisplay.COLUMNS_MAP_NOSORT.add("colMailHops");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener("load", doOnceLoaded, false);
|
|
@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
|
||||||
<?xml-stylesheet href="chrome://mailhops/skin/pb-styles.css" type="text/css"?>
|
|
||||||
|
|
||||||
<dialog id="mailHopsMap"
|
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
||||||
buttons="cancel"
|
|
||||||
onload="loadMap();"
|
|
||||||
title="MailHops Map"
|
|
||||||
buttonlabelcancel="Close">
|
|
||||||
|
|
||||||
<iframe id="mailhops_iframe" flex="1" width="1024" height="768" style="overflow:hidden;" type="content"></iframe>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function loadMap(){
|
|
||||||
var args = window.arguments[0];
|
|
||||||
document.getElementById('mailhops_iframe').setAttribute('src',args.src);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</dialog>
|
|
@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<overlay id="mailhops_listcolumn"
|
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
|
||||||
<tree id="threadTree">
|
|
||||||
<treecols id="threadCols">
|
|
||||||
<splitter class="tree-splitter" />
|
|
||||||
<treecol id="colMailHops" persist="hidden ordinal width"
|
|
||||||
currentView="unthreaded" flex="2"
|
|
||||||
label="Country" tooltiptext="Click to sort by Country" />
|
|
||||||
</treecols>
|
|
||||||
</tree>
|
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/mailhops-1-utils.js"/>
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/mailhops-5-msgListColumn.js"/>
|
|
||||||
</overlay>
|
|
@ -1,55 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE overlay SYSTEM "chrome://mailhops/locale/strings.dtd" >
|
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://mailhops/skin/msgNotificationBar.css" type="text/css"?>
|
|
||||||
|
|
||||||
<overlay id="mailhopsNotificationOverlay"
|
|
||||||
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/mailhops-1-utils.js"/>
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/mailhops-2-msgNotificationBar.js"/>
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/mailhops-3.js"/>
|
|
||||||
|
|
||||||
<hbox id="mail-notification-top">
|
|
||||||
<stack id="mailhopsNoficationBox" collapsed="false" notificationside="top" class="notificationbox-stack" flex="1">
|
|
||||||
<notification id="mailhopsNotification" class="animated" value="remoteContent" type="info">
|
|
||||||
<hbox class="messageDetails">
|
|
||||||
<image id="mailhopsLogo" src="chrome://mailhops/content/images/mailhops32.png" tooltiptext="&mailhops_route_nav_options_label;"/>
|
|
||||||
|
|
||||||
<hbox id="mailhopsResult" flex="1">
|
|
||||||
|
|
||||||
<label id="mailHopsAccountMessage" class="bar-link" value="Join today" is="text-link" href="https://www.mailhops.com/#pricing"></label>
|
|
||||||
|
|
||||||
<label id="mailhopsResultText" class="bar-link"></label>
|
|
||||||
|
|
||||||
<label id="mailhopsResultWeather" class="bar-link"></label>
|
|
||||||
|
|
||||||
<hbox id="mailhopsHopsBox">
|
|
||||||
<toolbarbutton id="mailhopsDataPaneHops" label="&mailhops_hops;" class="toolbarbutton"></toolbarbutton>
|
|
||||||
<vbox id="mailhopsDataPaneDetails"></vbox>
|
|
||||||
</hbox>
|
|
||||||
<toolbarseparator />
|
|
||||||
<hbox id="mailhopsRefreshBox">
|
|
||||||
<toolbarbutton id="mailhopsDataPaneRefresh" label="&mailhops_route_nav_refresh_label;" class="toolbarbutton"></toolbarbutton>
|
|
||||||
</hbox>
|
|
||||||
<toolbarseparator />
|
|
||||||
<hbox id="mailhopsUnsubscribeBox">
|
|
||||||
<toolbarbutton id="mailhopsUnsubscribe" label="&mailhops_unsubscribe;" class="toolbarbutton"></toolbarbutton>
|
|
||||||
</hbox>
|
|
||||||
<toolbarseparator />
|
|
||||||
<label id="mailhopsDataPaneMailer" class="auth-item" is="text-link" 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="bar-link auth-item" value="" tooltiptext="DNSBL"></label>
|
|
||||||
|
|
||||||
</hbox>
|
|
||||||
</hbox>
|
|
||||||
</notification>
|
|
||||||
</stack>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
</overlay>
|
|
@ -1,617 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
|
||||||
<?xml-stylesheet href="chrome://mailhops/skin/prefs.css" type="text/css"?>
|
|
||||||
|
|
||||||
<!DOCTYPE window [
|
|
||||||
<!ENTITY % MailHopsDTD SYSTEM "chrome://mailhops/locale/prefs.dtd">
|
|
||||||
%MailHopsDTD;
|
|
||||||
]>
|
|
||||||
|
|
||||||
<dialog id="mailHopsPreferences"
|
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
||||||
buttons="accept,cancel"
|
|
||||||
onload="mailHopPreferences.loadPreferences();"
|
|
||||||
title="MailHops &mailhops_preferences;">
|
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/mailhops-1-utils.js"/>
|
|
||||||
<script type="application/x-javascript" src="chrome://mailhops/content/mailhops-4-preferences.js"/>
|
|
||||||
|
|
||||||
<vbox width="400px">
|
|
||||||
|
|
||||||
<tabbox id="mhTabs" selectedIndex="0">
|
|
||||||
<tabs>
|
|
||||||
<tab label="&mailhops_tab_member_label;"/>
|
|
||||||
<tab label="&mailhops_tab_filters_label;"/>
|
|
||||||
<tab label="&mailhops_tab_defaults_label;"/>
|
|
||||||
<tab label="&mailhops_tab_display_label;"/>
|
|
||||||
<tab label="&mailhops_tab_api_label;"/>
|
|
||||||
</tabs>
|
|
||||||
<tabpanels>
|
|
||||||
<tabpanel>
|
|
||||||
<groupbox flex="1">
|
|
||||||
<caption label="MailHops &mailhops_tab_member_label;"/>
|
|
||||||
<description>
|
|
||||||
API Key <label xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" is="text-link" id="mailhops-membership-link" class="text-link plain" value="Join MailHops" href="https://www.mailhops.com/#pricing"/>
|
|
||||||
</description>
|
|
||||||
<hbox align="center">
|
|
||||||
<textbox id="mailhop.api_key" placeholder="Enter your MailHops API Member Key" width="500"/>
|
|
||||||
<button onclick="mailHopPreferences.saveAPIKey();">Save API Key</button>
|
|
||||||
</hbox>
|
|
||||||
<hbox align="center">
|
|
||||||
<description>
|
|
||||||
<label id="plan-error" class="text-error plain" value=""></label>
|
|
||||||
</description>
|
|
||||||
</hbox>
|
|
||||||
<hbox align="center">
|
|
||||||
<description>
|
|
||||||
<label id="plan" class="plain" value=""></label>
|
|
||||||
</description>
|
|
||||||
</hbox>
|
|
||||||
<hbox align="center">
|
|
||||||
<description>
|
|
||||||
<label id="status" class="plain" value=""></label>
|
|
||||||
</description>
|
|
||||||
</hbox>
|
|
||||||
<hbox align="center">
|
|
||||||
<description>
|
|
||||||
<label id="rate-limit" class="plain" value=""></label>
|
|
||||||
</description>
|
|
||||||
</hbox>
|
|
||||||
<hbox align="center">
|
|
||||||
<description>
|
|
||||||
<label id="rate-remaining" class="plain" value=""></label>
|
|
||||||
</description>
|
|
||||||
</hbox>
|
|
||||||
<hbox align="center">
|
|
||||||
<description>
|
|
||||||
<label id="rate-reset" class="plain" value=""></label>
|
|
||||||
</description>
|
|
||||||
</hbox>
|
|
||||||
</groupbox>
|
|
||||||
</tabpanel>
|
|
||||||
|
|
||||||
<tabpanel>
|
|
||||||
<groupbox flex="1" style="height:400px;overflow: scroll;">
|
|
||||||
<caption label="&mailhops_tab_filters_label;"/>
|
|
||||||
<checkbox id="mailhop.country_tag" label="Tag messages with country origin" checked="false" disabled="true" class="filters"/>
|
|
||||||
<checkbox id="mailhop.travel_time_junk" label="Tag messages that take longer than 10 seconds as Junk" checked="false" disabled="true" class="filters"/>
|
|
||||||
|
|
||||||
<description class="filters">Mark messages as Junk from Countries checked below.
|
|
||||||
<label id="select-all-filters" class="text-link plain filters" value="All " onclick="mailHopPreferences.countryListSelectAll(true);" disabled="true"/>
|
|
||||||
<label id="select-none-filters" class="text-link plain filters" value=" None" onclick="mailHopPreferences.countryListSelectAll(false);" disabled="true"/>
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<grid flex="1">
|
|
||||||
<columns>
|
|
||||||
<column flex="1"/>
|
|
||||||
<column flex="1"/>
|
|
||||||
<column flex="1"/>
|
|
||||||
</columns>
|
|
||||||
<rows>
|
|
||||||
<row>
|
|
||||||
<vbox>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ad" value="ad" label="ad"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ae" value="ae" label="ae"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_af" value="af" label="af"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ag" value="ag" label="ag"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ai" value="ai" label="ai"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_al" value="al" label="al"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_am" value="am" label="am"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_an" value="an" label="an"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ao" value="ao" label="ao"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ar" value="ar" label="ar"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_as" value="as" label="as"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_at" value="at" label="at"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_au" value="au" label="au"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_aw" value="aw" label="aw"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ax" value="ax" label="ax"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_az" value="az" label="az"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ba" value="ba" label="ba"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bb" value="bb" label="bb"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bd" value="bd" label="bd"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_be" value="be" label="be"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bf" value="bf" label="bf"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bg" value="bg" label="bg"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bh" value="bh" label="bh"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bi" value="bi" label="bi"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bj" value="bj" label="bj"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bm" value="bm" label="bm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bn" value="bn" label="bn"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bo" value="bo" label="bo"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_br" value="br" label="br"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bs" value="bs" label="bs"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bt" value="bt" label="bt"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bv" value="bv" label="bv"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bw" value="bw" label="bw"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_by" value="by" label="by"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_bz" value="bz" label="bz"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ca" value="ca" label="ca"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_catalonia" value="catalonia" label="catalonia"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cc" value="cc" label="cc"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cd" value="cd" label="cd"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cf" value="cf" label="cf"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cg" value="cg" label="cg"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ch" value="ch" label="ch"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ci" value="ci" label="ci"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ck" value="ck" label="ck"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cl" value="cl" label="cl"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cm" value="cm" label="cm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cn" value="cn" label="cn"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_co" value="co" label="co"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cr" value="cr" label="cr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cs" value="cs" label="cs"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cu" value="cu" label="cu"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cv" value="cv" label="cv"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cx" value="cx" label="cx"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cy" value="cy" label="cy"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_cz" value="cz" label="cz"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_de" value="de" label="de"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_dj" value="dj" label="dj"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_dk" value="dk" label="dk"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_dm" value="dm" label="dm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_do" value="do" label="do"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_dz" value="dz" label="dz"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ec" value="ec" label="ec"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ee" value="ee" label="ee"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_eg" value="eg" label="eg"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_eh" value="eh" label="eh"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_england" value="england" label="england"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_er" value="er" label="er"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_es" value="es" label="es"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_et" value="et" label="et"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_europeanunion" value="europeanunion" label="europeanunion"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_fam" value="fam" label="fam"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_fi" value="fi" label="fi"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_fj" value="fj" label="fj"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_fk" value="fk" label="fk"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_fm" value="fm" label="fm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_fo" value="fo" label="fo"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_fr" value="fr" label="fr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ga" value="ga" label="ga"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gb" value="gb" label="gb"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gd" value="gd" label="gd"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ge" value="ge" label="ge"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gf" value="gf" label="gf"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gh" value="gh" label="gh"/>
|
|
||||||
</vbox>
|
|
||||||
<vbox>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gi" value="gi" label="gi"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gl" value="gl" label="gl"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gm" value="gm" label="gm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gn" value="gn" label="gn"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gp" value="gp" label="gp"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gq" value="gq" label="gq"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gr" value="gr" label="gr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gs" value="gs" label="gs"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gt" value="gt" label="gt"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gu" value="gu" label="gu"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gw" value="gw" label="gw"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_gy" value="gy" label="gy"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_hk" value="hk" label="hk"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_hm" value="hm" label="hm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_hn" value="hn" label="hn"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_hr" value="hr" label="hr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ht" value="ht" label="ht"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_hu" value="hu" label="hu"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_id" value="id" label="id"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ie" value="ie" label="ie"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_il" value="il" label="il"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_in" value="in" label="in"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_io" value="io" label="io"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_iq" value="iq" label="iq"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ir" value="ir" label="ir"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_is" value="is" label="is"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_it" value="it" label="it"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_jm" value="jm" label="jm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_jo" value="jo" label="jo"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_jp" value="jp" label="jp"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ke" value="ke" label="ke"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_kg" value="kg" label="kg"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_kh" value="kh" label="kh"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ki" value="ki" label="ki"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_km" value="km" label="km"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_kn" value="kn" label="kn"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_kp" value="kp" label="kp"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_kr" value="kr" label="kr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_kw" value="kw" label="kw"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ky" value="ky" label="ky"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_kz" value="kz" label="kz"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_la" value="la" label="la"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_lb" value="lb" label="lb"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_lc" value="lc" label="lc"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_li" value="li" label="li"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_lk" value="lk" label="lk"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_lr" value="lr" label="lr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ls" value="ls" label="ls"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_lt" value="lt" label="lt"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_lu" value="lu" label="lu"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_lv" value="lv" label="lv"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ly" value="ly" label="ly"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ma" value="ma" label="ma"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mc" value="mc" label="mc"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_md" value="md" label="md"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_me" value="me" label="me"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mg" value="mg" label="mg"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mh" value="mh" label="mh"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mk" value="mk" label="mk"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ml" value="ml" label="ml"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mm" value="mm" label="mm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mn" value="mn" label="mn"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mo" value="mo" label="mo"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mp" value="mp" label="mp"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mq" value="mq" label="mq"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mr" value="mr" label="mr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ms" value="ms" label="ms"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mt" value="mt" label="mt"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mu" value="mu" label="mu"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mv" value="mv" label="mv"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mw" value="mw" label="mw"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mx" value="mx" label="mx"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_my" value="my" label="my"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_mz" value="mz" label="mz"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_na" value="na" label="na"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_nc" value="nc" label="nc"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ne" value="ne" label="ne"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_nf" value="nf" label="nf"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ng" value="ng" label="ng"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ni" value="ni" label="ni"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_nl" value="nl" label="nl"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_no" value="no" label="no"/>
|
|
||||||
</vbox>
|
|
||||||
<vbox>
|
|
||||||
<checkbox disabled="true" class="country" id="country_np" value="np" label="np"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_nr" value="nr" label="nr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_nu" value="nu" label="nu"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_nz" value="nz" label="nz"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_om" value="om" label="om"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pa" value="pa" label="pa"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pe" value="pe" label="pe"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pf" value="pf" label="pf"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pg" value="pg" label="pg"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ph" value="ph" label="ph"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pk" value="pk" label="pk"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pl" value="pl" label="pl"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pm" value="pm" label="pm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pn" value="pn" label="pn"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pr" value="pr" label="pr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ps" value="ps" label="ps"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pt" value="pt" label="pt"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_pw" value="pw" label="pw"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_py" value="py" label="py"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_qa" value="qa" label="qa"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_re" value="re" label="re"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ro" value="ro" label="ro"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_rs" value="rs" label="rs"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ru" value="ru" label="ru"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_rw" value="rw" label="rw"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sa" value="sa" label="sa"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sb" value="sb" label="sb"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sc" value="sc" label="sc"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_scotland" value="scotland" label="scotland"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sd" value="sd" label="sd"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_se" value="se" label="se"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sg" value="sg" label="sg"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sh" value="sh" label="sh"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_si" value="si" label="si"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sj" value="sj" label="sj"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sk" value="sk" label="sk"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sl" value="sl" label="sl"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sm" value="sm" label="sm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sn" value="sn" label="sn"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_so" value="so" label="so"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sr" value="sr" label="sr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_st" value="st" label="st"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sv" value="sv" label="sv"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sy" value="sy" label="sy"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_sz" value="sz" label="sz"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tc" value="tc" label="tc"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_td" value="td" label="td"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tf" value="tf" label="tf"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tg" value="tg" label="tg"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_th" value="th" label="th"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tj" value="tj" label="tj"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tk" value="tk" label="tk"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tl" value="tl" label="tl"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tm" value="tm" label="tm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tn" value="tn" label="tn"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_to" value="to" label="to"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tr" value="tr" label="tr"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tt" value="tt" label="tt"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tv" value="tv" label="tv"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tw" value="tw" label="tw"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_tz" value="tz" label="tz"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ua" value="ua" label="ua"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ug" value="ug" label="ug"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_um" value="um" label="um"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_us" value="us" label="us"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_uy" value="uy" label="uy"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_uz" value="uz" label="uz"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_va" value="va" label="va"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_vc" value="vc" label="vc"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ve" value="ve" label="ve"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_vg" value="vg" label="vg"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_vi" value="vi" label="vi"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_vn" value="vn" label="vn"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_vu" value="vu" label="vu"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_wales" value="wales" label="wales"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_wf" value="wf" label="wf"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ws" value="ws" label="ws"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_ye" value="ye" label="ye"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_yt" value="yt" label="yt"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_za" value="za" label="za"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_zm" value="zm" label="zm"/>
|
|
||||||
<checkbox disabled="true" class="country" id="country_zw" value="zw" label="zw"/>
|
|
||||||
</vbox>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
</groupbox>
|
|
||||||
</tabpanel>
|
|
||||||
|
|
||||||
<tabpanel>
|
|
||||||
<groupbox flex="1">
|
|
||||||
<caption label="&mailhops_tab_defaults_label; Language"/>
|
|
||||||
<radiogroup id="mailhop.lang">
|
|
||||||
<radio value="en" label="English" selected="true"/>
|
|
||||||
<radio value="de" label="German"/>
|
|
||||||
<radio value="es" label="Spanish"/>
|
|
||||||
<radio value="fr" label="French"/>
|
|
||||||
<radio value="ja" label="Japanese"/>
|
|
||||||
<radio value="pl" label="Polish"/>
|
|
||||||
<radio value="pt-BR" label="Portuguese"/>
|
|
||||||
<radio value="ru" label="Russian"/>
|
|
||||||
<radio value="zh-CH" label="Chinese"/>
|
|
||||||
</radiogroup>
|
|
||||||
</groupbox>
|
|
||||||
|
|
||||||
<groupbox flex="1">
|
|
||||||
<caption label="&mailhops_tab_defaults_label; Units"/>
|
|
||||||
<radiogroup id="mailhop.unit">
|
|
||||||
<radio value="mi" label="Miles and ºF" selected="true"/>
|
|
||||||
<radio value="km" label="Kilometers and ºC"/>
|
|
||||||
</radiogroup>
|
|
||||||
</groupbox>
|
|
||||||
|
|
||||||
<groupbox flex="1">
|
|
||||||
<caption label="&mailhops_tab_defaults_label; Map"/>
|
|
||||||
<menulist id="mailhop.map_provider">
|
|
||||||
<menupopup>
|
|
||||||
<menuitem value="OpenStreetMap.Mapnik" label="OpenStreetMap.Mapnik" />
|
|
||||||
<menuitem value="OpenStreetMap.BlackAndWhite" label="OpenStreetMap.BlackAndWhite" />
|
|
||||||
<menuitem value="OpenStreetMap.DE" label="OpenStreetMap.DE" />
|
|
||||||
<menuitem value="OpenStreetMap.France" label="OpenStreetMap.France" />
|
|
||||||
<menuitem value="OpenStreetMap.HOT" label="OpenStreetMap.HOT" />
|
|
||||||
<menuitem value="OpenSeaMap" label="OpenSeaMap" />
|
|
||||||
<menuitem value="OpenTopoMap" label="OpenTopoMap" />
|
|
||||||
<menuitem value="Thunderforest.OpenCycleMap" label="Thunderforest.OpenCycleMap" />
|
|
||||||
<menuitem value="Thunderforest.Transport" label="Thunderforest.Transport" />
|
|
||||||
<menuitem value="Thunderforest.TransportDark" label="Thunderforest.TransportDark" />
|
|
||||||
<menuitem value="Thunderforest.Landscape" label="Thunderforest.Landscape" />
|
|
||||||
<menuitem value="Thunderforest.Outdoors" label="Thunderforest.Outdoors" />
|
|
||||||
<menuitem value="OpenMapSurfer.Roads" label="OpenMapSurfer.Roads" />
|
|
||||||
<menuitem value="OpenMapSurfer.AdminBounds" label="OpenMapSurfer.AdminBounds" />
|
|
||||||
<menuitem value="OpenMapSurfer.Grayscale" label="OpenMapSurfer.Grayscale" />
|
|
||||||
<menuitem value="Hydda.Full" label="Hydda.Full" />
|
|
||||||
<menuitem value="Hydda.Base" label="Hydda.Base" />
|
|
||||||
<menuitem value="Hydda.RoadsAndLabels" label="Hydda.RoadsAndLabels" />
|
|
||||||
<menuitem value="MapQuestOpen.OSM" label="MapQuestOpen.OSM" />
|
|
||||||
<menuitem value="MapQuestOpen.Aerial" label="MapQuestOpen.Aerial" />
|
|
||||||
<menuitem value="MapQuestOpen.HybridOverlay" label="MapQuestOpen.HybridOverlay" />
|
|
||||||
<menuitem value="MapBox" label="MapBox" />
|
|
||||||
<menuitem value="Stamen.Toner" label="Stamen.Toner" />
|
|
||||||
<menuitem value="Stamen.TonerBackground" label="Stamen.TonerBackground" />
|
|
||||||
<menuitem value="Stamen.TonerHybrid" label="Stamen.TonerHybrid" />
|
|
||||||
<menuitem value="Stamen.TonerLines" label="Stamen.TonerLines" />
|
|
||||||
<menuitem value="Stamen.TonerLabels" label="Stamen.TonerLabels" />
|
|
||||||
<menuitem value="Stamen.TonerLite" label="Stamen.TonerLite" />
|
|
||||||
<menuitem value="Stamen.Watercolor" label="Stamen.Watercolor" />
|
|
||||||
<menuitem value="Stamen.Terrain" label="Stamen.Terrain" />
|
|
||||||
<menuitem value="Stamen.TerrainBackground" label="Stamen.TerrainBackground" />
|
|
||||||
<menuitem value="Stamen.TopOSMRelief" label="Stamen.TopOSMRelief" />
|
|
||||||
<menuitem value="Stamen.TopOSMFeatures" label="Stamen.TopOSMFeatures" />
|
|
||||||
<menuitem value="Esri.WorldStreetMap" label="Esri.WorldStreetMap" />
|
|
||||||
<menuitem value="Esri.DeLorme" label="Esri.DeLorme" />
|
|
||||||
<menuitem value="Esri.WorldTopoMap" label="Esri.WorldTopoMap" />
|
|
||||||
<menuitem value="Esri.WorldImagery" label="Esri.WorldImagery" />
|
|
||||||
<menuitem value="Esri.WorldTerrain" label="Esri.WorldTerrain" />
|
|
||||||
<menuitem value="Esri.WorldShadedRelief" label="Esri.WorldShadedRelief" />
|
|
||||||
<menuitem value="Esri.WorldPhysical" label="Esri.WorldPhysical" />
|
|
||||||
<menuitem value="Esri.OceanBasemap" label="Esri.OceanBasemap" />
|
|
||||||
<menuitem value="Esri.NatGeoWorldMap" label="Esri.NatGeoWorldMap" />
|
|
||||||
<menuitem value="Esri.WorldGrayCanvas" label="Esri.WorldGrayCanvas" />
|
|
||||||
<menuitem value="OpenWeatherMap.Clouds" label="OpenWeatherMap.Clouds" />
|
|
||||||
<menuitem value="OpenWeatherMap.CloudsClassic" label="OpenWeatherMap.CloudsClassic" />
|
|
||||||
<menuitem value="OpenWeatherMap.Precipitation" label="OpenWeatherMap.Precipitation" />
|
|
||||||
<menuitem value="OpenWeatherMap.PrecipitationClassic" label="OpenWeatherMap.PrecipitationClassic" />
|
|
||||||
<menuitem value="OpenWeatherMap.Rain" label="OpenWeatherMap.Rain" />
|
|
||||||
<menuitem value="OpenWeatherMap.RainClassic" label="OpenWeatherMap.RainClassic" />
|
|
||||||
<menuitem value="OpenWeatherMap.Pressure" label="OpenWeatherMap.Pressure" />
|
|
||||||
<menuitem value="OpenWeatherMap.PressureContour" label="OpenWeatherMap.PressureContour" />
|
|
||||||
<menuitem value="OpenWeatherMap.Wind" label="OpenWeatherMap.Wind" />
|
|
||||||
<menuitem value="OpenWeatherMap.Temperature" label="OpenWeatherMap.Temperature" />
|
|
||||||
<menuitem value="OpenWeatherMap.Snow" label="OpenWeatherMap.Snow" />
|
|
||||||
<menuitem value="HERE.normalDay" label="HERE.normalDay" />
|
|
||||||
<menuitem value="HERE.normalDayCustom" label="HERE.normalDayCustom" />
|
|
||||||
<menuitem value="HERE.normalDayGrey" label="HERE.normalDayGrey" />
|
|
||||||
<menuitem value="HERE.normalDayMobile" label="HERE.normalDayMobile" />
|
|
||||||
<menuitem value="HERE.normalDayGreyMobile" label="HERE.normalDayGreyMobile" />
|
|
||||||
<menuitem value="HERE.normalDayTransit" label="HERE.normalDayTransit" />
|
|
||||||
<menuitem value="HERE.normalDayTransitMobile" label="HERE.normalDayTransitMobile" />
|
|
||||||
<menuitem value="HERE.normalNight" label="HERE.normalNight" />
|
|
||||||
<menuitem value="HERE.normalNightMobile" label="HERE.normalNightMobile" />
|
|
||||||
<menuitem value="HERE.normalNightGrey" label="HERE.normalNightGrey" />
|
|
||||||
<menuitem value="HERE.normalNightGreyMobile" label="HERE.normalNightGreyMobile" />
|
|
||||||
<menuitem value="HERE.carnavDayGrey" label="HERE.carnavDayGrey" />
|
|
||||||
<menuitem value="HERE.hybridDay" label="HERE.hybridDay" />
|
|
||||||
<menuitem value="HERE.hybridDayMobile" label="HERE.hybridDayMobile" />
|
|
||||||
<menuitem value="HERE.pedestrianDay" label="HERE.pedestrianDay" />
|
|
||||||
<menuitem value="HERE.pedestrianNight" label="HERE.pedestrianNight" />
|
|
||||||
<menuitem value="HERE.satelliteDay" label="HERE.satelliteDay" />
|
|
||||||
<menuitem value="HERE.terrainDay" label="HERE.terrainDay" />
|
|
||||||
<menuitem value="HERE.terrainDayMobile" label="HERE.terrainDayMobile" />
|
|
||||||
<menuitem value="Acetate.basemap" label="Acetate.basemap" />
|
|
||||||
<menuitem value="Acetate.terrain" label="Acetate.terrain" />
|
|
||||||
<menuitem value="Acetate.all" label="Acetate.all" />
|
|
||||||
<menuitem value="Acetate.foreground" label="Acetate.foreground" />
|
|
||||||
<menuitem value="Acetate.roads" label="Acetate.roads" />
|
|
||||||
<menuitem value="Acetate.labels" label="Acetate.labels" />
|
|
||||||
<menuitem value="Acetate.hillshading" label="Acetate.hillshading" />
|
|
||||||
<menuitem value="FreeMapSK" label="FreeMapSK" />
|
|
||||||
<menuitem value="MtbMap" label="MtbMap" />
|
|
||||||
<menuitem value="CartoDB.Positron" label="CartoDB.Positron" />
|
|
||||||
<menuitem value="CartoDB.PositronNoLabels" label="CartoDB.PositronNoLabels" />
|
|
||||||
<menuitem value="CartoDB.DarkMatter" label="CartoDB.DarkMatter" />
|
|
||||||
<menuitem value="CartoDB.DarkMatterNoLabels" label="CartoDB.DarkMatterNoLabels" />
|
|
||||||
<menuitem value="HikeBike.HikeBike" label="HikeBike.HikeBike" />
|
|
||||||
<menuitem value="HikeBike.HillShading" label="HikeBike.HillShading" />
|
|
||||||
<menuitem value="BasemapAT.basemap" label="BasemapAT.basemap" />
|
|
||||||
<menuitem value="BasemapAT.grau" label="BasemapAT.grau" />
|
|
||||||
<menuitem value="BasemapAT.overlay" label="BasemapAT.overlay" />
|
|
||||||
<menuitem value="BasemapAT.highdpi" label="BasemapAT.highdpi" />
|
|
||||||
<menuitem value="BasemapAT.orthofoto" label="BasemapAT.orthofoto" />
|
|
||||||
<menuitem value="NASAGIBS.ModisTerraTrueColorCR" label="NASAGIBS.ModisTerraTrueColorCR" />
|
|
||||||
<menuitem value="NASAGIBS.ModisTerraBands367CR" label="NASAGIBS.ModisTerraBands367CR" />
|
|
||||||
<menuitem value="NASAGIBS.ViirsEarthAtNight2012" label="NASAGIBS.ViirsEarthAtNight2012" />
|
|
||||||
<menuitem value="NASAGIBS.ModisTerraLSTDay" label="NASAGIBS.ModisTerraLSTDay" />
|
|
||||||
<menuitem value="NASAGIBS.ModisTerraSnowCover" label="NASAGIBS.ModisTerraSnowCover" />
|
|
||||||
<menuitem value="NASAGIBS.ModisTerraAOD" label="NASAGIBS.ModisTerraAOD" />
|
|
||||||
<menuitem value="NASAGIBS.ModisTerraChlorophyll" label="NASAGIBS.ModisTerraChlorophyll" />
|
|
||||||
</menupopup>
|
|
||||||
</menulist>
|
|
||||||
</groupbox>
|
|
||||||
</tabpanel>
|
|
||||||
<tabpanel>
|
|
||||||
<groupbox flex="1">
|
|
||||||
<caption label="&mailhops_tab_display_label;"/>
|
|
||||||
<description>
|
|
||||||
Use any <label xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" is="text-link" class="text-link plain" href="https://en.wikipedia.org/wiki/Web_colors" value="HTML color name or Hex code"/>.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<description id="display_preview" style="font-size: 14px; color: #777; background: #FFF;">
|
|
||||||
<image src="chrome://mailhops/content/images/mailhops32.png" width="32" height="32"/>
|
|
||||||
MailHops Bar
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<div height="20"></div>
|
|
||||||
|
|
||||||
<grid>
|
|
||||||
<columns>
|
|
||||||
<column/>
|
|
||||||
</columns>
|
|
||||||
<rows>
|
|
||||||
<row>
|
|
||||||
<label value="Bar Color"></label>
|
|
||||||
<textbox id="mailhop.bar_color" value="#FFF" placeholder="Enter a hex color code"/>
|
|
||||||
<grid class="grid-color">
|
|
||||||
<columns>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
</columns>
|
|
||||||
<rows>
|
|
||||||
<row>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #eeeeee"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #c9c9c9"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #afafaf"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #a9e0f2"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #5cade0"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #84e8af"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #569603"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #f7e7bb"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #f2a232"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #fff1cc"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #e8f28c"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #d1994b"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #754947"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #e7c0f9"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #53067c"></div>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<label value="Font Color"></label>
|
|
||||||
<textbox id="mailhop.font_color" value="#777" placeholder="Enter a hex color code"/>
|
|
||||||
<grid class="grid-color">
|
|
||||||
<columns>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
</columns>
|
|
||||||
<rows>
|
|
||||||
<row>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(null,this.style.backgroundColor);" style="cursor: pointer; background-color: #ffffff"></div>
|
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(null,this.style.backgroundColor);" style="cursor: pointer; background-color: #000000"></div>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<label value="Font Size"></label>
|
|
||||||
<textbox id="mailhop.font_size" value="14px" placeholder="Enter a size in pixels"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<span></span>
|
|
||||||
<button onclick="mailHopPreferences.ResetDisplay('#FFF','#777','14px');" style="text-align:center;">Reset Display</button>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
|
|
||||||
<checkbox id="mailhop.hide_compact" label="Hide MailHops Bar when CompactHeaders are collapsed" checked="false"/>
|
|
||||||
<label xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" is="text-link" class="text-link plain" href="https://addons.mozilla.org/en-us/thunderbird/addon/compactheader/" value="CompactHeaders Add-on"/>
|
|
||||||
|
|
||||||
</groupbox>
|
|
||||||
</tabpanel>
|
|
||||||
|
|
||||||
<tabpanel>
|
|
||||||
<groupbox>
|
|
||||||
<caption label="&mailhops_tab_api_label;"/>
|
|
||||||
<grid>
|
|
||||||
<columns>
|
|
||||||
<column/>
|
|
||||||
<column flex="1"/>
|
|
||||||
</columns>
|
|
||||||
<rows>
|
|
||||||
<row>
|
|
||||||
<menulist id="mailhop.api_http">
|
|
||||||
<menupopup>
|
|
||||||
<menuitem value="https://" label="https://" />
|
|
||||||
<menuitem value="http://" label="http://" />
|
|
||||||
</menupopup>
|
|
||||||
</menulist>
|
|
||||||
<textbox id="mailhop.api_host" value="api.mailhops.com" flex="1" placeholder="Enter MailHops API host"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<hbox/>
|
|
||||||
<hbox flex="1">
|
|
||||||
<button onclick="mailHopPreferences.TestConnection();">&mailhops_connection_test;</button>
|
|
||||||
<button onclick="mailHopPreferences.ResetConnection();">&mailhops_connection_reset;</button>
|
|
||||||
</hbox>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
|
|
||||||
<spacer/>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
MailHops API uses <label xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" is="text-link" class="text-link plain" value="DarkSky" href="https://darksky.net"/> to get the weather of the sender, register for an API Key to enable this feature.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<textbox id="mailhop.fkey" value="" placeholder="Enter your DarkSky API Key"/>
|
|
||||||
|
|
||||||
<checkbox id="mailhop.debug" label="Debug" checked="false"/>
|
|
||||||
</groupbox>
|
|
||||||
</tabpanel>
|
|
||||||
|
|
||||||
</tabpanels>
|
|
||||||
</tabbox>
|
|
||||||
</vbox>
|
|
||||||
|
|
||||||
</dialog>
|
|
@ -1,8 +0,0 @@
|
|||||||
<!ENTITY mailhops_preferences "Einstellungen">
|
|
||||||
<!ENTITY mailhops_tab_member_label "Mitglied">
|
|
||||||
<!ENTITY mailhops_tab_filters_label "Filter">
|
|
||||||
<!ENTITY mailhops_tab_defaults_label "Grundeinstellungen">
|
|
||||||
<!ENTITY mailhops_tab_display_label "Anzeige">
|
|
||||||
<!ENTITY mailhops_tab_api_label "API & Hosting">
|
|
||||||
<!ENTITY mailhops_connection_test "Verbindung testen">
|
|
||||||
<!ENTITY mailhops_connection_reset "Verbindung zurücksetzen">
|
|
@ -1,9 +0,0 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops Route">
|
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "Karte">
|
|
||||||
<!ENTITY mailhops_route_nav_details_label "Einzelheiten">
|
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "Neu laden">
|
|
||||||
<!ENTITY mailhops_route_nav_options_label "Einstellungen">
|
|
||||||
<!ENTITY mailhops_unsubscribe "Abbestellen">
|
|
||||||
<!ENTITY mailhops_hops "Hops">
|
|
@ -1,8 +0,0 @@
|
|||||||
<!ENTITY mailhops_preferences "Preferences">
|
|
||||||
<!ENTITY mailhops_tab_member_label "Member">
|
|
||||||
<!ENTITY mailhops_tab_filters_label "Filters">
|
|
||||||
<!ENTITY mailhops_tab_defaults_label "Default">
|
|
||||||
<!ENTITY mailhops_tab_display_label "Display">
|
|
||||||
<!ENTITY mailhops_tab_api_label "API & Hosting">
|
|
||||||
<!ENTITY mailhops_connection_test "Test Connection">
|
|
||||||
<!ENTITY mailhops_connection_reset "Reset Connection">
|
|
@ -1,9 +0,0 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops Route">
|
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "Map">
|
|
||||||
<!ENTITY mailhops_route_nav_details_label "Details">
|
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "Refresh">
|
|
||||||
<!ENTITY mailhops_route_nav_options_label "Preferences">
|
|
||||||
<!ENTITY mailhops_unsubscribe "Unsubscribe">
|
|
||||||
<!ENTITY mailhops_hops "Hops">
|
|
@ -1,8 +0,0 @@
|
|||||||
<!ENTITY mailhops_preferences "Preferencias">
|
|
||||||
<!ENTITY mailhops_tab_member_label "Member">
|
|
||||||
<!ENTITY mailhops_tab_filters_label "Filters">
|
|
||||||
<!ENTITY mailhops_tab_defaults_label "Default">
|
|
||||||
<!ENTITY mailhops_tab_display_label "Display">
|
|
||||||
<!ENTITY mailhops_tab_api_label "API & Hosting">
|
|
||||||
<!ENTITY mailhops_connection_test "Test Connection">
|
|
||||||
<!ENTITY mailhops_connection_reset "Reset Connection">
|
|
@ -1,9 +0,0 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops Ruta">
|
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Aut">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "mapa">
|
|
||||||
<!ENTITY mailhops_route_nav_details_label "detalles">
|
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "refrescar">
|
|
||||||
<!ENTITY mailhops_route_nav_options_label "Preferencias">
|
|
||||||
<!ENTITY mailhops_unsubscribe "Unsubscribe">
|
|
||||||
<!ENTITY mailhops_hops "Hops">
|
|
@ -1,8 +0,0 @@
|
|||||||
<!ENTITY mailhops_preferences "Préférences">
|
|
||||||
<!ENTITY mailhops_tab_member_label "Compte">
|
|
||||||
<!ENTITY mailhops_tab_filters_label "Filtrage">
|
|
||||||
<!ENTITY mailhops_tab_defaults_label "Autres paramètres">
|
|
||||||
<!ENTITY mailhops_tab_display_label "Apparence de la barre">
|
|
||||||
<!ENTITY mailhops_tab_api_label "Serveur & API">
|
|
||||||
<!ENTITY mailhops_connection_test "Tester la connexion">
|
|
||||||
<!ENTITY mailhops_connection_reset "Rétablir la connexion par défaut">
|
|
@ -1,9 +0,0 @@
|
|||||||
<!ENTITY mailhops_header_route_label "Trajet">
|
|
||||||
<!ENTITY mailhops_header_auth_label "Authentification">
|
|
||||||
<!ENTITY mailhops_header_meta_label "Autres données">
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "Afficher la Carte">
|
|
||||||
<!ENTITY mailhops_route_nav_details_label "Détails">
|
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "Actualiser">
|
|
||||||
<!ENTITY mailhops_route_nav_options_label "Préférences">
|
|
||||||
<!ENTITY mailhops_unsubscribe "Se désabonner">
|
|
||||||
<!ENTITY mailhops_hops "Trajet">
|
|
@ -1,8 +0,0 @@
|
|||||||
<!ENTITY mailhops_preferences "設定">
|
|
||||||
<!ENTITY mailhops_tab_member_label "Member">
|
|
||||||
<!ENTITY mailhops_tab_filters_label "Filters">
|
|
||||||
<!ENTITY mailhops_tab_defaults_label "Default">
|
|
||||||
<!ENTITY mailhops_tab_display_label "Display">
|
|
||||||
<!ENTITY mailhops_tab_api_label "API & Hosting">
|
|
||||||
<!ENTITY mailhops_connection_test "Test Connection">
|
|
||||||
<!ENTITY mailhops_connection_reset "Reset Connection">
|
|
@ -1,9 +0,0 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHopsルート">
|
|
||||||
<!ENTITY mailhops_header_auth_label "MailHopsメーラー/認証">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHopsメタ">
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "マップ">
|
|
||||||
<!ENTITY mailhops_route_nav_details_label "細部">
|
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "リフレッシュ">
|
|
||||||
<!ENTITY mailhops_route_nav_options_label "設定">
|
|
||||||
<!ENTITY mailhops_unsubscribe "Unsubscribe">
|
|
||||||
<!ENTITY mailhops_hops "Hops">
|
|
@ -1,8 +0,0 @@
|
|||||||
<!ENTITY mailhops_preferences "opcje">
|
|
||||||
<!ENTITY mailhops_tab_member_label "Member">
|
|
||||||
<!ENTITY mailhops_tab_filters_label "Filters">
|
|
||||||
<!ENTITY mailhops_tab_defaults_label "Default">
|
|
||||||
<!ENTITY mailhops_tab_display_label "Display">
|
|
||||||
<!ENTITY mailhops_tab_api_label "API & Hosting">
|
|
||||||
<!ENTITY mailhops_connection_test "Test Connection">
|
|
||||||
<!ENTITY mailhops_connection_reset "Reset Connection">
|
|
@ -1,10 +0,0 @@
|
|||||||
<!ENTITY mailhops_header_route_label "Trasa">
|
|
||||||
<!ENTITY mailhops_header_auth_label "Mailer/Auth">
|
|
||||||
<!ENTITY mailhops_header_lists_label "Listy">
|
|
||||||
<!ENTITY mailhops_header_meta_label "Meta">
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "mapa">
|
|
||||||
<!ENTITY mailhops_route_nav_details_label "szczegóły">
|
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "odśwież">
|
|
||||||
<!ENTITY mailhops_route_nav_options_label "opcje">
|
|
||||||
<!ENTITY mailhops_unsubscribe "Unsubscribe">
|
|
||||||
<!ENTITY mailhops_hops "Hops">
|
|
@ -1,8 +0,0 @@
|
|||||||
<!ENTITY mailhops_preferences "Preferências">
|
|
||||||
<!ENTITY mailhops_tab_member_label "Member">
|
|
||||||
<!ENTITY mailhops_tab_filters_label "Filters">
|
|
||||||
<!ENTITY mailhops_tab_defaults_label "Default">
|
|
||||||
<!ENTITY mailhops_tab_display_label "Display">
|
|
||||||
<!ENTITY mailhops_tab_api_label "API & Hosting">
|
|
||||||
<!ENTITY mailhops_connection_test "Test Connection">
|
|
||||||
<!ENTITY mailhops_connection_reset "Reset Connection">
|
|
@ -1,9 +0,0 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops Route">
|
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Mailer/Auth">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Meta">
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "mapa">
|
|
||||||
<!ENTITY mailhops_route_nav_details_label "detalhes">
|
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "refrescar">
|
|
||||||
<!ENTITY mailhops_route_nav_options_label "Preferências">
|
|
||||||
<!ENTITY mailhops_unsubscribe "Unsubscribe">
|
|
||||||
<!ENTITY mailhops_hops "Hops">
|
|
@ -1,8 +0,0 @@
|
|||||||
<!ENTITY mailhops_preferences "предпочтения">
|
|
||||||
<!ENTITY mailhops_tab_member_label "Member">
|
|
||||||
<!ENTITY mailhops_tab_filters_label "Filters">
|
|
||||||
<!ENTITY mailhops_tab_defaults_label "Default">
|
|
||||||
<!ENTITY mailhops_tab_display_label "Display">
|
|
||||||
<!ENTITY mailhops_tab_api_label "API & Hosting">
|
|
||||||
<!ENTITY mailhops_connection_test "Test Connection">
|
|
||||||
<!ENTITY mailhops_connection_reset "Reset Connection">
|
|
@ -1,9 +0,0 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops маршрута">
|
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops Мейлер / Авт">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops Мета">
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "карта">
|
|
||||||
<!ENTITY mailhops_route_nav_details_label "подробности">
|
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "обновление">
|
|
||||||
<!ENTITY mailhops_route_nav_options_label "предпочтения">
|
|
||||||
<!ENTITY mailhops_unsubscribe "Unsubscribe">
|
|
||||||
<!ENTITY mailhops_hops "Hops">
|
|
@ -1,8 +0,0 @@
|
|||||||
<!ENTITY mailhops_preferences "优先">
|
|
||||||
<!ENTITY mailhops_tab_member_label "Member">
|
|
||||||
<!ENTITY mailhops_tab_filters_label "Filters">
|
|
||||||
<!ENTITY mailhops_tab_defaults_label "Default">
|
|
||||||
<!ENTITY mailhops_tab_display_label "Display">
|
|
||||||
<!ENTITY mailhops_tab_api_label "API & Hosting">
|
|
||||||
<!ENTITY mailhops_connection_test "Test Connection">
|
|
||||||
<!ENTITY mailhops_connection_reset "Reset Connection">
|
|
@ -1,9 +0,0 @@
|
|||||||
<!ENTITY mailhops_header_route_label "MailHops路线">
|
|
||||||
<!ENTITY mailhops_header_auth_label "MailHops梅勒/验证">
|
|
||||||
<!ENTITY mailhops_header_meta_label "MailHops元">
|
|
||||||
<!ENTITY mailhops_route_nav_map_label "地圖">
|
|
||||||
<!ENTITY mailhops_route_nav_details_label "詳細信息">
|
|
||||||
<!ENTITY mailhops_route_nav_refresh_label "刷新">
|
|
||||||
<!ENTITY mailhops_route_nav_options_label "优先">
|
|
||||||
<!ENTITY mailhops_unsubscribe "Unsubscribe">
|
|
||||||
<!ENTITY mailhops_hops "Hops">
|
|
@ -1,161 +0,0 @@
|
|||||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
|
||||||
|
|
||||||
#mailhopsResultText { padding-left:20px; background-repeat: no-repeat; }
|
|
||||||
|
|
||||||
#mailhopsNoficationBox menuitem .menu-iconic-icon { width: 16px; height: 11px; }
|
|
||||||
|
|
||||||
#mailhopsNoficationBox .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;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsNoficationBox {
|
|
||||||
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 24px;
|
|
||||||
font-weight: normal;
|
|
||||||
position: relative;
|
|
||||||
max-height: 50px;
|
|
||||||
width: 100%;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsNotification {
|
|
||||||
background: #f7f7f7;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsResult {
|
|
||||||
position: relative;
|
|
||||||
display: inline-flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsNoficationBox .bar-link {
|
|
||||||
cursor: pointer;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsNoficationBox .bar-link:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsNoficationBox #mailhopsDataPanePrefsLink {
|
|
||||||
border-radius: 20px;
|
|
||||||
background-color: #CCC;
|
|
||||||
letter-spacing: .1em;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsLogo,
|
|
||||||
#mailhopsResultText,
|
|
||||||
#mailhopsResultWeather,
|
|
||||||
#mailhopsUnsubscribe,
|
|
||||||
#mailhopsDataPaneDNSBL,
|
|
||||||
#mailhopsDataPaneDKIM,
|
|
||||||
#mailhopsDataPaneSPF,
|
|
||||||
#mailhopsDataPaneMailer {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsLogo,
|
|
||||||
#mailhopsResultText,
|
|
||||||
#mailhopsResultWeather,
|
|
||||||
#mailhopsUnsubscribe {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsNoficationBox .unsubscribe {
|
|
||||||
color: #CCC;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsLogo {
|
|
||||||
-webkit-filter: grayscale(100%);
|
|
||||||
filter: grayscale(100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsLogo:hover {
|
|
||||||
-webkit-filter: none;
|
|
||||||
filter: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailHopsAccountMessage {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsDataPaneDetails {
|
|
||||||
border-radius: 10px;
|
|
||||||
display: none;
|
|
||||||
padding: 10px;
|
|
||||||
border: 1px solid #CCC;
|
|
||||||
color: #333;
|
|
||||||
background-color: #FFF;
|
|
||||||
position: fixed;
|
|
||||||
margin-top: 0;
|
|
||||||
z-index: 10000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsDataPaneDetails .hop {
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
padding-left: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsDataPaneDetails .host {
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
color: #777;
|
|
||||||
padding-left: 22px;
|
|
||||||
margin-left: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsNoficationBox toolbarseparator {
|
|
||||||
appearance: none;
|
|
||||||
-moz-appearance: none;
|
|
||||||
margin: 3px 0px 3px 0px!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsNoficationBox .toolbarbutton {
|
|
||||||
font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;
|
|
||||||
font-weight: 400;
|
|
||||||
padding: 0 4px 0 4px;
|
|
||||||
margin: unset!important;
|
|
||||||
color: #777!important;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsNoficationBox #mailhopsHopsBox:hover,
|
|
||||||
#mailhopsNoficationBox #mailhopsRefreshBox:hover,
|
|
||||||
#mailhopsNoficationBox #mailhopsUnsubscribeBox:hover,
|
|
||||||
#mailhopsNoficationBox #mailhopsHopsBox.active {
|
|
||||||
color: #333;
|
|
||||||
background-color: #e5e5e5;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailhopsNoficationBox .messageCloseButton,
|
|
||||||
#mailhopsNoficationBox .messageDetails:nth-child(2) {
|
|
||||||
display: none!important;
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
#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;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailHopsPreferences button{
|
|
||||||
height: 35px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mailHopsPreferences .grid-color{
|
|
||||||
margin-top: 7px;
|
|
||||||
}
|
|
24
content/mailhops_details.xhtml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>MailHops</title>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.css" integrity="sha512-g/MzOGVPy3OQ4ej1U+qe4D/xhLwUn5l5xL0Fa7gdC258ZWVJQGwsbIR47SWMpRxSPjD0tfu/xkilTy+Lhrl3xg==" crossorigin="anonymous" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="popup-page">
|
||||||
|
<div id="hop-message" class="ui message">
|
||||||
|
<div id="hop-message-header" class="header" style="text-align: center;"></div>
|
||||||
|
</div>
|
||||||
|
<div id="hop-list" class="ui relaxed divided list" style="padding: 10px;">
|
||||||
|
</div>
|
||||||
|
<div class="wrapbutton">
|
||||||
|
<button type="button" class="ui green button" id="mh-map-button">Map</button>
|
||||||
|
<button type="button" class="ui icon button" id="mh-options-button" style="float: right;">Options</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="/js/utils.js"></script>
|
||||||
|
<script src="/js/mailhops_details.js" defer="true"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
43
content/preferences.html
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.css" integrity="sha512-g/MzOGVPy3OQ4ej1U+qe4D/xhLwUn5l5xL0Fa7gdC258ZWVJQGwsbIR47SWMpRxSPjD0tfu/xkilTy+Lhrl3xg==" crossorigin="anonymous" />
|
||||||
|
</head>
|
||||||
|
<body style="padding: 20px;">
|
||||||
|
<img src="/images/mailhops-logo.png" width="300"/>
|
||||||
|
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
|
<form class="ui form">
|
||||||
|
<div class="field">
|
||||||
|
<label>MailHops API Key</label>
|
||||||
|
<input type="text" id="mailhop.api_key" placeholder="Enter your MailHops API Key" style="width: 50%"/>
|
||||||
|
<br/>
|
||||||
|
<a href="https://www.mailhops.com/#pricing" id="join-link" target="_blank">Join MailHops</a>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label>OpenWeatherMap.org API Key</label>
|
||||||
|
<input type="text" id="mailhop.owm_key" value="" placeholder="Enter your OpenWeatherMap API Key" style="width: 50%"/>
|
||||||
|
<br/>
|
||||||
|
MailHops API uses <a href="https://.openweathermap.org" target="_blank">OpenWeatherMap</a> to get the weather of the sender
|
||||||
|
<br/>Register for an API Key to enable this feature.
|
||||||
|
</div>
|
||||||
|
<button class="ui primary button" id="save">Save</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<h3>MailHops Plan Info</h3>
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
<p>
|
||||||
|
<label id="plan-error" class="ui red basic label" style="display: none;"></label><br/>
|
||||||
|
<label id="plan"></label><br/>
|
||||||
|
<label id="status"></label><br/>
|
||||||
|
<label id="rate-limit"></label><br/>
|
||||||
|
<label id="rate-remaining"></label><br/>
|
||||||
|
<label id="rate-reset"></label><br/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<script src="/js/preferences.js"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Before Width: | Height: | Size: 793 B After Width: | Height: | Size: 793 B |
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 749 B After Width: | Height: | Size: 749 B |
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 295 B After Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 283 B After Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 436 B |
Before Width: | Height: | Size: 746 B After Width: | Height: | Size: 746 B |
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 641 B |
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 643 B |
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 604 B After Width: | Height: | Size: 604 B |
Before Width: | Height: | Size: 591 B After Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 643 B |
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 497 B |
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 488 B |
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 506 B |
Before Width: | Height: | Size: 647 B After Width: | Height: | Size: 647 B |
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 403 B |
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 524 B |
Before Width: | Height: | Size: 663 B After Width: | Height: | Size: 663 B |
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 585 B |
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 504 B |
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 497 B |
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 457 B |
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 675 B |
Before Width: | Height: | Size: 486 B After Width: | Height: | Size: 486 B |
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 639 B |
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 500 B |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 512 B |
Before Width: | Height: | Size: 443 B After Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 514 B After Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
Before Width: | Height: | Size: 625 B After Width: | Height: | Size: 625 B |
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 528 B |
Before Width: | Height: | Size: 614 B After Width: | Height: | Size: 614 B |
Before Width: | Height: | Size: 521 B After Width: | Height: | Size: 521 B |
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 453 B After Width: | Height: | Size: 453 B |
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 586 B |
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 472 B |
Before Width: | Height: | Size: 483 B After Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 477 B |
Before Width: | Height: | Size: 439 B After Width: | Height: | Size: 439 B |
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 563 B |