diff --git a/chrome/content/images/info.png b/chrome/content/images/info.png new file mode 100644 index 0000000..12cd1ae Binary files /dev/null and b/chrome/content/images/info.png differ diff --git a/chrome/content/mailhops.js b/chrome/content/mailhops.js index 63686b6..0ea7ac8 100644 --- a/chrome/content/mailhops.js +++ b/chrome/content/mailhops.js @@ -169,8 +169,7 @@ var regexAllIp = /(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)\.(1\d{ //display auth mailHops.displayResultAuth(headXMailer,headUserAgent,headXMimeOLE,headAuth,headReceivedSPF); //display unsubscribe link - if(headListUnsubscribe) - mailHops.displayResultLists(headListUnsubscribe); + mailHops.displayResultLists(headListUnsubscribe); var received_ips; var all_ips = new Array(); @@ -240,30 +239,40 @@ mailHops.testIP = function(ip,header){ return retval; }; -mailHops.displayResultLists = function( header_unsubscribe){ +mailHops.displayResultLists = function( header_unsubscribe ){ while(mailHops.resultListDataPane.firstChild) { mailHops.resultListDataPane.removeChild(mailHops.resultListDataPane.firstChild); } - var listArr=header_unsubscribe.split(','); - var href=''; - for(var h=0;h',''); - var link = document.createElement('a'); - link.setAttribute('href',href); - if(href.indexOf('mailto:')!=-1) - link.innerHTML='Unsubscribe via Email'; - else - link.innerHTML='Unsubscribe'; - mailHops.resultListDataPane.appendChild(link); + if(header_unsubscribe){ + var listArr=header_unsubscribe.split(','); + var href=''; + if(listArr.length!=0){ + for(var h=0;h',''); + var label = document.createElement('label'); + + label.setAttribute('class','text-link dataPaneURLitem'); + + if(href.indexOf('mailto:')!=-1){ + label.setAttribute('value','Unsubscribe via Email'); + + if(href.toLowerCase().indexOf('subject=')==-1){ + if(href.indexOf('?')==-1) + href+='?subject=Unsubscribe'; + else + href+='&subject=Unsubscribe'; + } + } + else{ + label.setAttribute('value','Unsubscribe'); + } + label.setAttribute('href',href); + mailHops.resultListDataPane.appendChild(label); + } + } } - if(!href) - mailHops.mailhopsListContainer.style.display='none'; - else{ - mailHops.mailhopsListContainer.style.display='block'; - } - }; mailHops.displayResultAuth = function( header_xmailer, header_useragent, header_xmimeole, header_auth, header_spf ){ diff --git a/chrome/content/msgHdrViewOverlay.xul b/chrome/content/msgHdrViewOverlay.xul index 5642072..1bc9d84 100644 --- a/chrome/content/msgHdrViewOverlay.xul +++ b/chrome/content/msgHdrViewOverlay.xul @@ -48,14 +48,12 @@ - + - - + - - + diff --git a/chrome/skin/classic/mailhops.css b/chrome/skin/classic/mailhops.css index 48194c5..f863cbe 100644 --- a/chrome/skin/classic/mailhops.css +++ b/chrome/skin/classic/mailhops.css @@ -55,8 +55,4 @@ .auth-item{ display: none; -} - -#dataPaneMailHopsListContainer{ - display: none; } \ No newline at end of file diff --git a/install.rdf b/install.rdf index c462643..1da2673 100644 --- a/install.rdf +++ b/install.rdf @@ -7,7 +7,7 @@ postbox@mailhops.com 2 MailHops - 0.6.4 + 0.6.5 MailHops maps the route an email traveled to get to you. Using GeoIP it also displays distance traveled along with the location (city, state and country) of the sender. chrome://mailhops/content/images/mailhops32.png http://mailhops.com diff --git a/mailhops-0.6.4-pb.xpi b/mailhops-0.6.4-pb.xpi new file mode 100644 index 0000000..31a3424 Binary files /dev/null and b/mailhops-0.6.4-pb.xpi differ diff --git a/mailhops-0.6.5-pb.xpi b/mailhops-0.6.5-pb.xpi new file mode 100644 index 0000000..040e4c5 Binary files /dev/null and b/mailhops-0.6.5-pb.xpi differ