diff --git a/CHANGELOG.md b/CHANGELOG.md index 87ae987..84af94c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## [1.0.1] - 2015-06-10 +### Added +- Context.IO sponsored message, build something awesome with their API! + +### Fixed +- Removed loading indicator when no received headers found +- Secure message parsing + ## [1.0.0] - 2015-05-31 ### Changed - Combined Thunderbird and Postbox code into one plugin diff --git a/chrome/content/images/contextio-200.png b/chrome/content/images/contextio-200.png new file mode 100644 index 0000000..d993c31 Binary files /dev/null and b/chrome/content/images/contextio-200.png differ diff --git a/chrome/content/mailhops.js b/chrome/content/mailhops.js index c6b5443..ecf78df 100644 --- a/chrome/content/mailhops.js +++ b/chrome/content/mailhops.js @@ -8,7 +8,7 @@ var mailHops = { msgURI: null , isLoaded: false - , options: {'version':'MailHops Postbox 1.0.0','lan':'en','unit':'mi','api_url':'http://api.mailhops.com','debug':false} + , options: {'version':'MailHops Postbox 1.0.1','lan':'en','unit':'mi','api_url':'http://api.mailhops.com','debug':false} , message: { secure:[] } , client_location: null }; @@ -214,7 +214,7 @@ mailHops.getRoute = function(){ if ( all_ips.length != 0 ){ mailHops.lookupRoute ( all_ips ) ; } else { - mailHopsDisplay.clear(); + mailHopsDisplay.clear( true ); } }; //another ip check, dates will throw off the regex @@ -240,10 +240,18 @@ mailHops.testIP = function(ip,header){ //check if this IP was part of a secure transmission if(retval){ - if(header.indexOf('using SSL') != -1) - mailHops.message.secure.push(ip+':'+header.substring(header.indexOf('using SSL'),header.indexOf('using TLS')+11)); - else if(header.indexOf('using TLS') != -1) - mailHops.message.secure.push(ip+':'+header.substring(header.indexOf('using TLS'),header.indexOf('using TLS')+11)); + if(header.indexOf('using SSL') != -1){ + if(header.substring(header.indexOf('using SSL')+11,header.indexOf('using SSL')+12) == '.') + mailHops.message.secure.push(ip+':'+header.substring(header.indexOf('using SSL'),header.indexOf('using TLS')+14)); + else + mailHops.message.secure.push(ip+':'+header.substring(header.indexOf('using SSL'),header.indexOf('using TLS')+11)); + } + else if(header.indexOf('using TLS') != -1){ + if(header.substring(header.indexOf('using TLS')+11,header.indexOf('using TLS')+12) == '.') + mailHops.message.secure.push(ip+':'+header.substring(header.indexOf('using TLS'),header.indexOf('using TLS')+14)); + else + mailHops.message.secure.push(ip+':'+header.substring(header.indexOf('using TLS'),header.indexOf('using TLS')+11)); + } else if(header.indexOf('version=TLSv1/SSLv3') != -1) mailHops.message.secure.push(ip+':'+'using TLSv1/SSLv3'); } diff --git a/chrome/content/pb-overlay.js b/chrome/content/pb-overlay.js index 854be2a..aa2e75f 100644 --- a/chrome/content/pb-overlay.js +++ b/chrome/content/pb-overlay.js @@ -223,7 +223,7 @@ var mailHopsDisplay = if(data && data.error){ this.resultTextDataPane.value = mailHopsUtils.error(data.meta.code); this.resultTextDataPane.setAttribute('tooltiptext',data.error.message); - }else{ + } else { this.resultTextDataPane.value = ' Service Unavailable.'; this.resultTextDataPane.setAttribute('tooltiptext',' Could not connect to MailHops API.'); } @@ -236,16 +236,22 @@ var mailHopsDisplay = this.resultTextDataPane3.value = ''; }, - clear: function(){ + clear: function(no_ips){ this.resultTextDataPane2.style.display = 'none'; this.resultContainerDetails.style.display = 'none'; this.resultDetailsLink.style.display = 'none'; this.resultMapLink.style.display = 'none'; this.mailhopsDataPaneDNSBL.style.display = 'none'; - this.resultTextDataPane.style.backgroundImage = 'url(chrome://mailhops/content/images/loader.gif)'; - this.resultTextDataPane.value = ' Looking Up Route'; - this.resultTextDataPane.setAttribute('tooltiptext','Looking Up Route'); + if(no_ips){ + this.resultTextDataPane.style.backgroundImage = 'url(chrome://mailhops/content/images/help.png)'; + this.resultTextDataPane.value = ' No IPs'; + this.resultTextDataPane.setAttribute('tooltiptext','There were no received headers found'); + } else { + this.resultTextDataPane.style.backgroundImage = 'url(chrome://mailhops/content/images/loader.gif)'; + this.resultTextDataPane.value = ' Looking Up Route'; + this.resultTextDataPane.setAttribute('tooltiptext','Looking Up Route'); + } this.resultTextDataPane2.value = ''; this.resultTextDataPane2.style.backgroundImage = ''; diff --git a/chrome/content/preferences.xul b/chrome/content/preferences.xul index 4cc120a..3276a73 100644 --- a/chrome/content/preferences.xul +++ b/chrome/content/preferences.xul @@ -72,24 +72,23 @@ - MailHops API is also available for download if you would like to host your own. + MailHops API hosting is sponsored by - + diff --git a/chrome/content/tb-overlay.js b/chrome/content/tb-overlay.js index 17ca322..fcd5464 100644 --- a/chrome/content/tb-overlay.js +++ b/chrome/content/tb-overlay.js @@ -152,13 +152,20 @@ var mailHopsDisplay = } }, - clear: function(){ + clear: function(no_ips){ this.mailhopsDataPaneDNSBL.style.display = 'none'; this.mailhopsResultWeather.style.display = 'none'; - this.resultText.style.backgroundImage='url(chrome://mailhops/content/images/loader.gif)'; - this.resultText.setAttribute('value',' Looking Up Route'); - + + if(no_ips){ + this.resultText.style.backgroundImage='url(chrome://mailhops/content/images/loader.gif)'; + this.resultText.setAttribute('value',' Looking Up Route'); + this.resultText.setAttribute('tooltiptext',' Looking Up Route'); + } else { + this.resultText.style.backgroundImage = 'url(chrome://mailhops/content/images/loader.gif)'; + this.resultText.value = ' Looking Up Route'; + this.resultText.setAttribute('tooltiptext','Looking Up Route'); + } }, route: function ( header_route, message, response, meta, lookup_url ){ diff --git a/chrome/skin/classic/pb-styles.css b/chrome/skin/classic/pb-styles.css index 6c10a50..ac9615c 100644 --- a/chrome/skin/classic/pb-styles.css +++ b/chrome/skin/classic/pb-styles.css @@ -88,4 +88,10 @@ button { padding-left: 20px; } -#mhTabs .act { padding-left: 20px; background-repeat: no-repeat; outline : none;} \ No newline at end of file +#mhTabs .act { + padding: 5px 10px 5px 20px; + outline: none; + display: inline-block; + position: relative; + background-repeat: no-repeat; +} \ No newline at end of file diff --git a/install.rdf b/install.rdf index b8a0ea1..0e5cf6c 100644 --- a/install.rdf +++ b/install.rdf @@ -5,7 +5,7 @@ 2 thunderbird@mailhops.com - 1.0.0 + 1.0.1 MailHops 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. diff --git a/mailhops.xpi b/mailhops.xpi index 03d19bc..82f2f3b 100644 Binary files a/mailhops.xpi and b/mailhops.xpi differ