1
0
mirror of https://github.com/MailHops/mailhops-plugin.git synced 2025-05-31 04:50:09 -07:00

Added Context.IO

Fixed loading indicator when no received headers
Bump 1.0.1
This commit is contained in:
Andrew Van Tassel 2015-06-10 21:58:47 -06:00
parent 28a4976e05
commit d2748a5788
9 changed files with 57 additions and 23 deletions

View File

@ -1,5 +1,13 @@
# Change Log # 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 ## [1.0.0] - 2015-05-31
### Changed ### Changed
- Combined Thunderbird and Postbox code into one plugin - Combined Thunderbird and Postbox code into one plugin

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -8,7 +8,7 @@ var mailHops =
{ {
msgURI: null msgURI: null
, isLoaded: false , 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:[] } , message: { secure:[] }
, client_location: null , client_location: null
}; };
@ -214,7 +214,7 @@ mailHops.getRoute = function(){
if ( all_ips.length != 0 ){ if ( all_ips.length != 0 ){
mailHops.lookupRoute ( all_ips ) ; mailHops.lookupRoute ( all_ips ) ;
} else { } else {
mailHopsDisplay.clear(); mailHopsDisplay.clear( true );
} }
}; };
//another ip check, dates will throw off the regex //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 //check if this IP was part of a secure transmission
if(retval){ if(retval){
if(header.indexOf('using SSL') != -1) 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)); mailHops.message.secure.push(ip+':'+header.substring(header.indexOf('using SSL'),header.indexOf('using TLS')+11));
else if(header.indexOf('using TLS') != -1) }
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)); mailHops.message.secure.push(ip+':'+header.substring(header.indexOf('using TLS'),header.indexOf('using TLS')+11));
}
else if(header.indexOf('version=TLSv1/SSLv3') != -1) else if(header.indexOf('version=TLSv1/SSLv3') != -1)
mailHops.message.secure.push(ip+':'+'using TLSv1/SSLv3'); mailHops.message.secure.push(ip+':'+'using TLSv1/SSLv3');
} }

View File

@ -236,16 +236,22 @@ var mailHopsDisplay =
this.resultTextDataPane3.value = ''; this.resultTextDataPane3.value = '';
}, },
clear: function(){ clear: function(no_ips){
this.resultTextDataPane2.style.display = 'none'; this.resultTextDataPane2.style.display = 'none';
this.resultContainerDetails.style.display = 'none'; this.resultContainerDetails.style.display = 'none';
this.resultDetailsLink.style.display = 'none'; this.resultDetailsLink.style.display = 'none';
this.resultMapLink.style.display = 'none'; this.resultMapLink.style.display = 'none';
this.mailhopsDataPaneDNSBL.style.display = 'none'; this.mailhopsDataPaneDNSBL.style.display = 'none';
if(no_ips){
this.resultTextDataPane.style.backgroundImage = 'url(chrome://mailhops/content/images/help.png)';
this.resultTextDataPane.value = ' No IPs';
this.resultTextDataPane.setAttribute('tooltiptext','There were no received headers found');
} else {
this.resultTextDataPane.style.backgroundImage = 'url(chrome://mailhops/content/images/loader.gif)'; this.resultTextDataPane.style.backgroundImage = 'url(chrome://mailhops/content/images/loader.gif)';
this.resultTextDataPane.value = ' Looking Up Route'; this.resultTextDataPane.value = ' Looking Up Route';
this.resultTextDataPane.setAttribute('tooltiptext','Looking Up Route'); this.resultTextDataPane.setAttribute('tooltiptext','Looking Up Route');
}
this.resultTextDataPane2.value = ''; this.resultTextDataPane2.value = '';
this.resultTextDataPane2.style.backgroundImage = ''; this.resultTextDataPane2.style.backgroundImage = '';

View File

@ -72,24 +72,23 @@
<groupbox> <groupbox>
<caption label="MailHops API Hosting"/> <caption label="MailHops API Hosting"/>
<description> <description>
MailHops API is also available for download if you would like to host your own. MailHops API hosting is sponsored by <label class="text-link plain" value="Context.IO" href="https://context.io"/>.
<image src="chrome://mailhops/content/images/contextio-200.png" width="200"/>
</description> </description>
<textbox id="mailhop.api_url" value="http://api.mailhops.com"/> <textbox id="mailhop.api_url" value="http://api.mailhops.com" focused="true"/>
<label class="text-link plain act" onclick="TestConnection(this);" value="Test Connection" /> <label class="text-link plain act" onclick="TestConnection(this);" value="Test Connection" />
<label class="text-link plain act" onclick="ResetConnection();" value="Reset Connection" /> <label class="text-link plain act" onclick="ResetConnection();" value="Reset Connection" />
<checkbox id="mailhop.debug" label="Debug" checked="false"/>
<description> <description>
MailHops API uses Forecast.IO to get the weather of the sender, register for an API Key to enable this feature. MailHops API uses <label class="text-link plain" value="Forecast.IO" href="https://developer.forecast.io/"/> to get the weather of the sender, register for an API Key to enable this feature.
</description> </description>
<textbox id="mailhop.fkey" value=""/> <textbox id="mailhop.fkey" value=""/>
<label class="text-link plain" value="Forecast.IO" href="https://developer.forecast.io/"/> <checkbox id="mailhop.debug" label="Debug" checked="false"/>
</groupbox> </groupbox>
</tabpanel> </tabpanel>

View File

@ -152,13 +152,20 @@ var mailHopsDisplay =
} }
}, },
clear: function(){ clear: function(no_ips){
this.mailhopsDataPaneDNSBL.style.display = 'none'; this.mailhopsDataPaneDNSBL.style.display = 'none';
this.mailhopsResultWeather.style.display = 'none'; this.mailhopsResultWeather.style.display = 'none';
if(no_ips){
this.resultText.style.backgroundImage='url(chrome://mailhops/content/images/loader.gif)'; this.resultText.style.backgroundImage='url(chrome://mailhops/content/images/loader.gif)';
this.resultText.setAttribute('value',' Looking Up Route'); 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 ){ route: function ( header_route, message, response, meta, lookup_url ){

View File

@ -88,4 +88,10 @@ button {
padding-left: 20px; padding-left: 20px;
} }
#mhTabs .act { padding-left: 20px; background-repeat: no-repeat; outline : none;} #mhTabs .act {
padding: 5px 10px 5px 20px;
outline: none;
display: inline-block;
position: relative;
background-repeat: no-repeat;
}

View File

@ -5,7 +5,7 @@
<Description about="urn:mozilla:install-manifest"> <Description about="urn:mozilla:install-manifest">
<em:type>2</em:type> <em:type>2</em:type>
<em:id>thunderbird@mailhops.com</em:id> <em:id>thunderbird@mailhops.com</em:id>
<em:version>1.0.0</em:version> <em:version>1.0.1</em:version>
<em:name>MailHops</em:name> <em:name>MailHops</em:name>
<em:description>MailHops maps the route an email traveled to get to you. Using GeoIP it also displays distance traveled along with the location (city, state and country) of the sender.</em:description> <em:description>MailHops maps the route an email traveled to get to you. Using GeoIP it also displays distance traveled along with the location (city, state and country) of the sender.</em:description>

Binary file not shown.