mirror of
https://github.com/MailHops/mailhops-plugin.git
synced 2025-05-17 23:00:10 -07:00
Added app_version to MailHops API, updated lookup to use r parameter
This commit is contained in:
parent
2b46e09d27
commit
e2b1f2a612
@ -18,7 +18,8 @@ var mailHops =
|
|||||||
container: null,
|
container: null,
|
||||||
isLoaded: false,
|
isLoaded: false,
|
||||||
map: 'goog',
|
map: 'goog',
|
||||||
unit: 'mi'
|
unit: 'mi',
|
||||||
|
appVersion: 'MailHops Thunderbird 0.3'
|
||||||
}
|
}
|
||||||
|
|
||||||
mailHops.startLoading = function()
|
mailHops.startLoading = function()
|
||||||
@ -254,7 +255,7 @@ mailHops.lookup = function(route){
|
|||||||
var city;
|
var city;
|
||||||
var state;
|
var state;
|
||||||
|
|
||||||
xmlhttp.open("GET", 'http://api.mailhops.com/v1/lookup/?tb&route='+route.toString(),true);
|
xmlhttp.open("GET", 'http://api.mailhops.com/v1/lookup/?tb&app='+mailHops.appVersion+'&r='+route.toString(),true);
|
||||||
xmlhttp.onreadystatechange=function() {
|
xmlhttp.onreadystatechange=function() {
|
||||||
if (xmlhttp.readyState==4) {
|
if (xmlhttp.readyState==4) {
|
||||||
var data = nativeJSON.decode(xmlhttp.responseText);
|
var data = nativeJSON.decode(xmlhttp.responseText);
|
||||||
@ -296,7 +297,7 @@ function addCommas(nStr)
|
|||||||
function launchMap(route)
|
function launchMap(route)
|
||||||
{
|
{
|
||||||
//launch mailhops api map
|
//launch mailhops api map
|
||||||
var openwin = window.openDialog('http://api.mailhops.com/v1/map/?tb&m='+mailHops.map+'&u='+mailHops.unit+'&r='+route,"MailHops",'toolbar=no,location=no,directories=no,menubar=yes,scrollbars=yes,close=yes,width=730,height=330');
|
var openwin = window.openDialog('http://api.mailhops.com/v1/map/?tb&app='+mailHops.appVersion+'&m='+mailHops.map+'&u='+mailHops.unit+'&r='+route,"MailHops",'toolbar=no,location=no,directories=no,menubar=yes,scrollbars=yes,close=yes,width=730,height=330');
|
||||||
openwin.focus();
|
openwin.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<em:type>2</em:type>
|
<em:type>2</em:type>
|
||||||
|
|
||||||
<em:name>MailHops</em:name>
|
<em:name>MailHops</em:name>
|
||||||
<em:version>0.2</em:version>
|
<em:version>0.3</em:version>
|
||||||
<em:description>MailHops maps the route an email took to get to you.</em:description>
|
<em:description>MailHops maps the route an email took to get to you.</em:description>
|
||||||
|
|
||||||
<em:iconURL>chrome://mailhops/content/images/mailhops32.png</em:iconURL>
|
<em:iconURL>chrome://mailhops/content/images/mailhops32.png</em:iconURL>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user