mirror of
https://github.com/MailHops/mailhops-plugin.git
synced 2025-05-17 06:40:08 -07:00
Updated prefs and added map xul
This commit is contained in:
parent
7f26e8b121
commit
437f561dd9
BIN
chrome/content/images/auth/hardfail.png
Normal file
BIN
chrome/content/images/auth/hardfail.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 287 B |
@ -22,7 +22,7 @@ var mailHops =
|
||||
resultListDataPane: null,
|
||||
isLoaded: false,
|
||||
options: {'map':'goog','unit':'mi','api_url':'http://api.mailhops.com'},
|
||||
appVersion: 'MailHops Postbox 0.6.9.3'
|
||||
appVersion: 'MailHops Postbox 0.7'
|
||||
}
|
||||
|
||||
mailHops.init = function()
|
||||
@ -54,9 +54,8 @@ mailHops.init = function()
|
||||
|
||||
//event listner for route click to launch map
|
||||
mailHops.resultMapLink.addEventListener("click", function () {
|
||||
var route = this.getAttribute("route");
|
||||
if(route)
|
||||
mailHops.launchMap(String(route));
|
||||
if(this.hasAttribute("data-route"))
|
||||
mailHops.launchMap(String(this.getAttribute("data-route")));
|
||||
}
|
||||
, false);
|
||||
mailHops.resultDetailsLink.addEventListener("click", function () {
|
||||
@ -72,8 +71,8 @@ mailHops.init = function()
|
||||
, false);
|
||||
|
||||
mailHops.mailhopsDataPaneDNSBL.addEventListener("click", function () {
|
||||
var ip = this.getAttribute('data-ip');
|
||||
mailHops.launchSpamHausURL(ip);
|
||||
if(this.hasAttribute('data-ip'))
|
||||
mailHops.launchSpamHausURL(this.getAttribute('data-ip'));
|
||||
}
|
||||
, false);
|
||||
|
||||
@ -641,9 +640,9 @@ mailHops.displayResult = function ( header_route, response ){
|
||||
}
|
||||
|
||||
if(header_route)
|
||||
mailHops.resultMapLink.setAttribute("route", header_route);
|
||||
mailHops.resultMapLink.setAttribute("data-route", header_route);
|
||||
else
|
||||
mailHops.resultMapLink.removeAttribute("route");
|
||||
mailHops.resultMapLink.removeAttribute("data-route");
|
||||
|
||||
mailHops.resultTextDataPane.style.backgroundImage = 'url('+image+')';
|
||||
mailHops.resultTextDataPane.value = displayText;
|
||||
@ -836,20 +835,23 @@ mailHops.addCommas = function(nStr){
|
||||
mailHops.launchWhoIs = function(ip){
|
||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||
messenger.launchExternalURL(encodeURIComponent('http://www.mailhops.com/whois/'+ip));
|
||||
messenger.launchExternalURL('http://www.mailhops.com/whois/'+ip);
|
||||
};
|
||||
mailHops.launchSpamHausURL = function(ip){
|
||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||
messenger.launchExternalURL(encodeURIComponent('http://www.spamhaus.org/query/bl?ip='+ip));
|
||||
messenger.launchExternalURL('http://www.spamhaus.org/query/bl?ip='+ip);
|
||||
};
|
||||
|
||||
mailHops.launchMap = function(route){
|
||||
//launch mailhops api map
|
||||
var lookupURL=mailHops.options.api_url+'/v1/map/?pb&app='+mailHops.appVersion+'&m='+mailHops.options.map+'&u='+mailHops.options.unit+'&r='+String(route);
|
||||
if(mailHops.options.show_weather)
|
||||
lookupURL+='&w=1';
|
||||
var openwin = window.openDialog(encodeURIComponent(lookupURL),"MailHops",'toolbar=no,location=no,directories=no,menubar=yes,scrollbars=yes,close=yes,width=732,height=332');
|
||||
openwin.focus();
|
||||
|
||||
if(route != '') {
|
||||
var lookupURL=mailHops.options.api_url+'/v1/map/?pb&app='+mailHops.appVersion+'&m='+mailHops.options.map+'&u='+mailHops.options.unit+'&r='+String(route);
|
||||
if(mailHops.options.show_weather)
|
||||
lookupURL+='&w=1';
|
||||
|
||||
window.openDialog("chrome://mailhops/content/mailhopsMap.xul","MailHops",'toolbar=no,location=no,directories=no,menubar=yes,scrollbars=yes,close=yes,width=742,height=385', {src: lookupURL});
|
||||
}
|
||||
};
|
||||
|
||||
addEventListener ( "messagepane-loaded" , mailHops.setupEventListener , true ) ;
|
||||
|
22
chrome/content/mailhopsMap.xul
Normal file
22
chrome/content/mailhopsMap.xul
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://mailhops/skin/mailhops.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="732" height="332" style="overflow:hidden;"/>
|
||||
|
||||
<script>
|
||||
function loadMap(){
|
||||
var args = window.arguments[0];
|
||||
document.getElementById('mailhops_iframe').setAttribute('src',args.src);
|
||||
}
|
||||
</script>
|
||||
|
||||
</dialog>
|
@ -18,7 +18,6 @@
|
||||
<tabs>
|
||||
<tab label="Defaults"/>
|
||||
<tab label="Display"/>
|
||||
<tab label="Authentication"/>
|
||||
<tab label="Hosting"/>
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
@ -51,9 +50,7 @@
|
||||
<checkbox id="mailhop.show_host" label="Show Host" checked="false"/>
|
||||
<checkbox id="mailhop.show_weather" label="Show Weather" checked="false"/>
|
||||
</groupbox>
|
||||
</tabpanel>
|
||||
<tabpanel>
|
||||
<groupbox>
|
||||
<groupbox>
|
||||
<caption label="Authentication Options"/>
|
||||
<checkbox id="mailhop.show_mailer" label="Show Mailer" checked="true"/>
|
||||
<checkbox id="mailhop.show_spf" label="Show SPF" checked="true"/>
|
||||
@ -61,6 +58,7 @@
|
||||
<checkbox id="mailhop.show_dnsbl" label="Show DNS Blacklist" checked="true"/>
|
||||
</groupbox>
|
||||
</tabpanel>
|
||||
|
||||
<tabpanel>
|
||||
<groupbox>
|
||||
<caption label="MailHops API Hosting"/>
|
||||
@ -72,8 +70,8 @@
|
||||
<radio value="edu" label="Educational (Free)"/>
|
||||
<radio value="business" label="Business (Not-Free)"/>
|
||||
</radiogroup>
|
||||
<checkbox id="mailhop.use_private" label="Yes, I Agree to MailHops terms for the use of private hosting." checked="false" oncommand="ChangePrivate(this);"/>
|
||||
<label class="text-link" value="MailHops Terms and Conditions" href="http://www.mailhops.com/terms"/>
|
||||
<checkbox id="mailhop.use_private" label="Yes, I Agree to MailHops terms of use for hosting my own MailHops API." checked="false" oncommand="ChangePrivate(this);"/>
|
||||
<label class="text-link" value="MailHops Terms of Use" href="http://www.mailhops.com/terms"/>
|
||||
<textbox id="mailhop.api_url" value="http://api.mailhops.com" disabled="true"/>
|
||||
<label class="text-link" onclick="TestConnection();" value="Test Connection" /> <label class="text-link" onclick="ResetConnection();" value="Reset Connection" />
|
||||
</groupbox>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<em:id>postbox@mailhops.com</em:id>
|
||||
<em:type>2</em:type>
|
||||
<em:name>MailHops</em:name>
|
||||
<em:version>0.6.9.3</em:version>
|
||||
<em:version>0.7</em:version>
|
||||
<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:iconURL>chrome://mailhops/content/images/mailhops32.png</em:iconURL>
|
||||
<em:homepageURL>http://mailhops.com</em:homepageURL>
|
||||
|
BIN
mailhops-0.6.9.1-pb.xpi
Normal file
BIN
mailhops-0.6.9.1-pb.xpi
Normal file
Binary file not shown.
BIN
mailhops-0.6.9.2-pb.xpi
Normal file
BIN
mailhops-0.6.9.2-pb.xpi
Normal file
Binary file not shown.
BIN
mailhops-0.6.9.3-pb.xpi
Normal file
BIN
mailhops-0.6.9.3-pb.xpi
Normal file
Binary file not shown.
BIN
mailhops-0.7.xpi
Normal file
BIN
mailhops-0.7.xpi
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user