diff --git a/chrome/content/mailhops.js b/chrome/content/mailhops.js index fc9a2d2..8ddf149 100644 --- a/chrome/content/mailhops.js +++ b/chrome/content/mailhops.js @@ -19,7 +19,7 @@ var mailHops = isLoaded: false, map: 'goog', unit: 'mi', - appVersion: 'MailHops Thunderbird 0.4.2' + appVersion: 'MailHops Thunderbird 0.4.3' } mailHops.startLoading = function() @@ -178,11 +178,9 @@ mailHops.displayResult = function ( image, distance, city, state, countryName, r if(image.indexOf('error')!=-1) { displayText = ' There was a problem connecting to MailHops.'; - mailHops.container.removeAttribute("onclick"); } else if(image.indexOf('local')!=-1) { displayText = ' Local message.'; - mailHops.container.setAttribute("onclick","launchMap('"+route.toString()+"');"); } else { if(city && state) @@ -196,9 +194,13 @@ mailHops.displayResult = function ( image, distance, city, state, countryName, r displayText +=' ( '+addCommas(Math.round(distance.kilometers))+' km traveled )'; } else if(displayText=='') - displayText = ' Local message.'; - mailHops.container.setAttribute("onclick","launchMap('"+route.toString()+"');"); + displayText = ' Local message.'; } + //add event for route api map + if(route) + mailHops.container.setAttribute("onclick","launchMap('"+route.toString()+"');"); + else + mailHops.container.removeAttribute("onclick"); mailHops.resultText.textContent = displayText; mailHops.resultImage.src=image; diff --git a/install.rdf b/install.rdf index 7b8ad5a..d02f7b7 100644 --- a/install.rdf +++ b/install.rdf @@ -8,7 +8,7 @@ 2 MailHops - 0.4.2 + 0.4.3 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 @@ -19,12 +19,16 @@ chrome://mailhops/content/preferences.xul - + + + + {3550f703-e582-4d05-9a08-453d09bdfdc6} + 3.0 + 3.1 + + + + - -