diff --git a/CHANGELOG.md b/CHANGELOG.md index 783e45b..cff4d48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 3.6.8 - 2019-12-09 + +### Added +- Support for Thunderbird 68.* + +# Change Log + ## 3.2 - 2019-04-03 ### Added diff --git a/_locales/de/messages.json b/_locales/de/messages.json new file mode 100644 index 0000000..0c4b60a --- /dev/null +++ b/_locales/de/messages.json @@ -0,0 +1,8 @@ +{ + "appName": { + "message": "MailHops" + }, + "appDesc": { + "message": "MailHops Karten die Route eine E-Mail gereist, um bei Ihnen melden. Verwendung GeoIP es zeigt auch zurückgelegte Strecke zusammen mit dem Standort ( Ort, Bundesland und Land) des Absenders." + } +} \ No newline at end of file diff --git a/_locales/de/prefs.dtd b/_locales/de/prefs.dtd new file mode 100644 index 0000000..246dc99 --- /dev/null +++ b/_locales/de/prefs.dtd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/_locales/de/strings.dtd b/_locales/de/strings.dtd new file mode 100644 index 0000000..e808497 --- /dev/null +++ b/_locales/de/strings.dtd @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/_locales/en/messages.json b/_locales/en/messages.json new file mode 100644 index 0000000..780d0cf --- /dev/null +++ b/_locales/en/messages.json @@ -0,0 +1,8 @@ +{ + "appName": { + "message": "MailHops" + }, + "appDesc": { + "message": "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." + } +} \ No newline at end of file diff --git a/_locales/en/prefs.dtd b/_locales/en/prefs.dtd new file mode 100644 index 0000000..00e7e42 --- /dev/null +++ b/_locales/en/prefs.dtd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/_locales/en/strings.dtd b/_locales/en/strings.dtd new file mode 100644 index 0000000..ffb003c --- /dev/null +++ b/_locales/en/strings.dtd @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/_locales/es/messages.json b/_locales/es/messages.json new file mode 100644 index 0000000..b162f8f --- /dev/null +++ b/_locales/es/messages.json @@ -0,0 +1,8 @@ +{ + "appName": { + "message": "MailHops" + }, + "appDesc": { + "message": "Mapas MailHops la ruta un correo electrónico viajó a llegar a usted. Usando GeoIP también muestra la distancia recorrida junto con la ubicación ( ciudad, estado y país) del remitente." + } +} \ No newline at end of file diff --git a/_locales/es/prefs.dtd b/_locales/es/prefs.dtd new file mode 100644 index 0000000..7a8d1b9 --- /dev/null +++ b/_locales/es/prefs.dtd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/_locales/es/strings.dtd b/_locales/es/strings.dtd new file mode 100644 index 0000000..d8d2c35 --- /dev/null +++ b/_locales/es/strings.dtd @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json new file mode 100644 index 0000000..445d805 --- /dev/null +++ b/_locales/fr/messages.json @@ -0,0 +1,8 @@ +{ + "appName": { + "message": "MailHops" + }, + "appDesc": { + "message": "MailHops vous permet de connaître la route empruntée par un mail avant qu'il ne parvienne dans votre messagerie. Grâce à MailHops vous pourrez : connaître le lieu d'émission du mail (pays, ville); visualiser le parcours du mail sur une carte (avec un grand choix de styles de carte); ou encore connaître des informations plus techniques (le user-agent et l'authentification utilisés par l'expéditeur) et d'autres informations plus amusantes comme la distance totale parcourue par le mail ou la météo actuelle sur le lieu d'émission. La version gratuite (sans clef API) permet d'obtenir ces informations et bien d'autres pour 100 messages par tranche de 24h." + } +} \ No newline at end of file diff --git a/_locales/fr/prefs.dtd b/_locales/fr/prefs.dtd new file mode 100644 index 0000000..033b2b2 --- /dev/null +++ b/_locales/fr/prefs.dtd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/_locales/fr/strings.dtd b/_locales/fr/strings.dtd new file mode 100644 index 0000000..516019d --- /dev/null +++ b/_locales/fr/strings.dtd @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json new file mode 100644 index 0000000..f9660f6 --- /dev/null +++ b/_locales/ja/messages.json @@ -0,0 +1,8 @@ +{ + "appName": { + "message": "MailHops" + }, + "appDesc": { + "message": "MailHops 電子メールがあなたに取得するために旅したルートをマップします。のGeoIPを使用しても距離が送信者の場所(都市、州や国)と一緒に旅に表示されます。" + } +} \ No newline at end of file diff --git a/_locales/ja/prefs.dtd b/_locales/ja/prefs.dtd new file mode 100644 index 0000000..d1feea4 --- /dev/null +++ b/_locales/ja/prefs.dtd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/_locales/ja/strings.dtd b/_locales/ja/strings.dtd new file mode 100644 index 0000000..c130b6d --- /dev/null +++ b/_locales/ja/strings.dtd @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json new file mode 100644 index 0000000..2d64236 --- /dev/null +++ b/_locales/pl/messages.json @@ -0,0 +1,8 @@ +{ + "appName": { + "message": "MailHops" + } , + "appDesc": { + "message": "Wskazuje trasę, którą e-mail dotarł do adresata. Korzystając z GeoIP, pokazuje także przybliżony dystans do nadawcy oraz jego położenie (miasto, region i państwo)." + } +} \ No newline at end of file diff --git a/_locales/pl/prefs.dtd b/_locales/pl/prefs.dtd new file mode 100644 index 0000000..fbdbfac --- /dev/null +++ b/_locales/pl/prefs.dtd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/_locales/pl/strings.dtd b/_locales/pl/strings.dtd new file mode 100644 index 0000000..ee2295a --- /dev/null +++ b/_locales/pl/strings.dtd @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/_locales/pt-BR/messages.json b/_locales/pt-BR/messages.json new file mode 100644 index 0000000..50be3f4 --- /dev/null +++ b/_locales/pt-BR/messages.json @@ -0,0 +1,8 @@ +{ + "appName": { + "message": "MailHops" + }, + "appDesc": { + "message": "MailHops mapeia a rota um e-mail viajou para chegar até você . Usando GeoIP ele também exibe a distância percorrida , juntamente com a localização (cidade , estado e país ) do remetente." + } +} \ No newline at end of file diff --git a/_locales/pt-BR/prefs.dtd b/_locales/pt-BR/prefs.dtd new file mode 100644 index 0000000..289f30e --- /dev/null +++ b/_locales/pt-BR/prefs.dtd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/_locales/pt-BR/strings.dtd b/_locales/pt-BR/strings.dtd new file mode 100644 index 0000000..57fa712 --- /dev/null +++ b/_locales/pt-BR/strings.dtd @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json new file mode 100644 index 0000000..bb7c4fd --- /dev/null +++ b/_locales/ru/messages.json @@ -0,0 +1,8 @@ +{ + "appName": { + "message": "MailHops" + } , + "appDesc": { + "message": "MailHops отображает маршрутэлектронной почты , пройденное , чтобы добраться до вас. Использование GeoIP также отображает расстояние вместе с места (город, штат и страна ) отправителя." + } +} \ No newline at end of file diff --git a/_locales/ru/prefs.dtd b/_locales/ru/prefs.dtd new file mode 100644 index 0000000..3d72d34 --- /dev/null +++ b/_locales/ru/prefs.dtd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/_locales/ru/strings.dtd b/_locales/ru/strings.dtd new file mode 100644 index 0000000..d942635 --- /dev/null +++ b/_locales/ru/strings.dtd @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/_locales/zh-CN/messages.json b/_locales/zh-CN/messages.json new file mode 100644 index 0000000..593606e --- /dev/null +++ b/_locales/zh-CN/messages.json @@ -0,0 +1,8 @@ +{ + "appName": { + "message": "MailHops" + } , + "appDesc": { + "message": "MailHops 映射電子郵件前往得到你的路線。使用GeoIP的它也顯示行駛距離隨著發送者的位置(城市,州和國家" + } +} \ No newline at end of file diff --git a/_locales/zh-CN/prefs.dtd b/_locales/zh-CN/prefs.dtd new file mode 100644 index 0000000..263e744 --- /dev/null +++ b/_locales/zh-CN/prefs.dtd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/_locales/zh-CN/strings.dtd b/_locales/zh-CN/strings.dtd new file mode 100644 index 0000000..4dd569b --- /dev/null +++ b/_locales/zh-CN/strings.dtd @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/build.sh b/build.sh index b4a9982..840695a 100755 --- a/build.sh +++ b/build.sh @@ -2,26 +2,6 @@ filename='mailhops' -rm -f $filename.xpi +rm -f $filename.zip -find ./ -type f -name "._*" -exec rm {} \; - -mkdir build -mkdir build/chrome - -cd chrome -zip -r $filename.jar . -i *.js *.xul *.png *.gif *.rdf *.css *.dtd *.properties *.svg -mv $filename.jar ../build/chrome/ - -cd .. -cp *.rdf build -cp *.manifest build -cd build -zip -r $filename.xpi . -i *.rdf *.manifest *.jar -mv $filename.xpi ../ -cd .. -rm -rf build - -# git clone https://github.com/nmaier/xpisign.py.git -# add this for cert signing -# python xpisign.py -k cert.pem mailhops.xpi mailhops.signed.xpi +zip -r $filename.zip ./ -x ./images/* -i *.js *.xul *.png *.gif *.css *.json *.dtd _locales/*/messages.json *.manifest diff --git a/chrome.manifest b/chrome.manifest index 285394a..918e31a 100644 --- a/chrome.manifest +++ b/chrome.manifest @@ -1,18 +1,16 @@ -content mailhops jar:chrome/mailhops.jar!/content/ -skin mailhops classic/1.0 jar:chrome/mailhops.jar!/skin/classic/ -locale mailhops de jar:chrome/mailhops.jar!/locale/de/ -locale mailhops en jar:chrome/mailhops.jar!/locale/en/ -locale mailhops es jar:chrome/mailhops.jar!/locale/es/ -locale mailhops fr jar:chrome/mailhops.jar!/locale/fr/ -locale mailhops ja jar:chrome/mailhops.jar!/locale/ja/ -locale mailhops pl jar:chrome/mailhops.jar!/locale/pl/ -locale mailhops pt-BR jar:chrome/mailhops.jar!/locale/pt-BR/ -locale mailhops ru jar:chrome/mailhops.jar!/locale/ru/ -locale mailhops zh-CN jar:chrome/mailhops.jar!/locale/zh-CN/ +content mailhops chrome/content/ -# Postbox 5 -overlay chrome://messenger/content/mailWindowOverlay.xul chrome://mailhops/content/msgNotificationBar.xul application=postbox@postbox-inc.com +skin mailhops classic/1.0 chrome/skin/classic/ -# Thunberbird -overlay chrome://messenger/content/mailWindowOverlay.xul chrome://mailhops/content/msgNotificationBar.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6} -overlay chrome://messenger/content/messenger.xul chrome://mailhops/content/msgListColumn.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6} \ No newline at end of file +locale mailhops de chrome/locale/de/ +locale mailhops en chrome/locale/en/ +locale mailhops es chrome/locale/es/ +locale mailhops fr chrome/locale/fr/ +locale mailhops ja chrome/locale/ja/ +locale mailhops pl chrome/locale/pl/ +locale mailhops pt-BR chrome/locale/pt-BR/ +locale mailhops ru chrome/locale/ru/ +locale mailhops zh-CN chrome/locale/zh-CN/ + +overlay chrome://messenger/content/messenger.xul chrome://mailhops/content/msgNotificationBar.xul +overlay chrome://messenger/content/messenger.xul chrome://mailhops/content/msgListColumn.xul \ No newline at end of file diff --git a/chrome/content/utils.js b/chrome/content/mailhops-1-utils.js similarity index 100% rename from chrome/content/utils.js rename to chrome/content/mailhops-1-utils.js diff --git a/chrome/content/msgNotificationBar.js b/chrome/content/mailhops-2-msgNotificationBar.js similarity index 99% rename from chrome/content/msgNotificationBar.js rename to chrome/content/mailhops-2-msgNotificationBar.js index f26308d..bd8097e 100644 --- a/chrome/content/msgNotificationBar.js +++ b/chrome/content/mailhops-2-msgNotificationBar.js @@ -33,7 +33,7 @@ var mailHopsDisplay = this.mailhopsDataPaneDNSBL = document.getElementById("mailhopsDataPaneDNSBL"); //wait for message to be selected before showing - if(!reload) this.mhBox.style.display = 'none'; + if(!reload && this.mhBox) this.mhBox.style.display = 'none'; //event listner for route click to launch map this.mailhopsDataPaneDNSBL.addEventListener("click", function () { diff --git a/chrome/content/mailhops.js b/chrome/content/mailhops-3.js similarity index 94% rename from chrome/content/mailhops.js rename to chrome/content/mailhops-3.js index de4dc08..975ba58 100644 --- a/chrome/content/mailhops.js +++ b/chrome/content/mailhops-3.js @@ -4,12 +4,11 @@ * @website: http://mailhops.com */ -var mailHops = -{ +var mailHops = { msgURI: null, isLoaded: false, options: { - 'version':'MailHops Plugin 3.1.8', + 'version':'MailHops Plugin 3.6.8', 'lan':'en', 'unit':'mi', 'api_http':'https://', @@ -93,7 +92,7 @@ mailHops.StreamListener = { content: "" , found: false , - onDataAvailable: function ( request , context , inputStream , offset , count ) + onDataAvailable: function ( request, inputStream, offset, count ) { try { var sis = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance ( Components.interfaces.nsIScriptableInputStream ) ; @@ -117,15 +116,17 @@ mailHops.StreamListener = mailHops.LOG('StreamListener Error: '+JSON.stringify(e)); } }, - onStartRequest: function ( request , context ) + onStartRequest: function ( request ) { this.content = "" ; this.found = false ; }, - onStopRequest: function ( aRequest , aContext , aStatusCode ) + onStopRequest: function ( aRequest , aStatusCode ) { mailHops.headers = Components.classes["@mozilla.org/messenger/mimeheaders;1"].createInstance ( Components.interfaces.nsIMimeHeaders ) ; - mailHops.headers.initialize ( this.content , this.content.length ) ; + mailHops.headers.initialize(this.content, this.content.length); + mailHops.headerData = this.content; + console.log(this.content); mailHops.getRoute() ; } }; @@ -310,10 +311,11 @@ mailHops.testIP = function(ip,header){ return validIP; }; -mailHops.setupEventListener = function(){ +mailHops.setupEventListener = function () { if ( mailHops.isLoaded ){ - return ; + return; } + mailHops.LOG("Setting up Message listener"); mailHops.init(); mailHops.registerObserver(); @@ -328,12 +330,10 @@ mailHops.setupEventListener = function(){ //preferences observers mailHops.registerObserver = function(){ var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService( Components.interfaces.nsIPrefService ) ; - mailHops._branch = prefService.getBranch( "mail.mailHops." ) ; - try { - mailHops._branch.QueryInterface( Components.interfaces.nsIPrefBranchInternal ) ; - } catch (err){ - mailHops._branch.QueryInterface( Components.interfaces.nsIPrefBranch ) ; - } + mailHops._branch = prefService.getBranch("mail.mailHops."); + if (!("addObserver" in mailHops._branch)) + mailHops._branch.QueryInterface(Components.interfaces.nsIPrefBranch2); + mailHops._branch.addObserver( "" , mailHops , false ) ; }; @@ -502,4 +502,12 @@ mailHops.refreshCache = function(){ mailHops.getRoute(); }; -addEventListener( "messagepane-loaded" , mailHops.setupEventListener , true ); \ No newline at end of file +// window.addEventListener("messagepane-loaded", mailHops.setupEventListener, true); +window.addEventListener("load", function() { + var messagepane = document.getElementById("messagepane"); + if (messagepane) { + messagepane.addEventListener("load", function () { + mailHops.setupEventListener(); + }, true); + } +}, false); \ No newline at end of file diff --git a/chrome/content/preferences.js b/chrome/content/mailhops-4-preferences.js similarity index 100% rename from chrome/content/preferences.js rename to chrome/content/mailhops-4-preferences.js diff --git a/chrome/content/msgListColumn.js b/chrome/content/mailhops-5-msgListColumn.js similarity index 87% rename from chrome/content/msgListColumn.js rename to chrome/content/mailhops-5-msgListColumn.js index 443773d..8cace5e 100644 --- a/chrome/content/msgListColumn.js +++ b/chrome/content/mailhops-5-msgListColumn.js @@ -23,9 +23,11 @@ var columnHandler = { }, isString: function() {return true;}, - getCellProperties: function(row, col, props){}, + getCellProperties: function (row, col, props) { + return 'colMailHops'; + }, getRowProperties: function(row, props){}, - getImageSrc: function(row, col) { + getImageSrc: function (row, col) { var msgKey = gDBView.getKeyAt(row); var msgHdr = gDBView.db.GetMsgHdrForKey(msgKey); var countryCode = null; @@ -64,7 +66,10 @@ function doOnceLoaded() { } function addCustomColumnHandler() { - gDBView.addColumnHandler("colMailHops", columnHandler); + gDBView.addColumnHandler("colMailHops", columnHandler); + if ("COLUMNS_MAP_NOSORT" in gFolderDisplay) { + gFolderDisplay.COLUMNS_MAP_NOSORT.add("colMailHops"); + } } -addEventListener( "load", doOnceLoaded, false ); \ No newline at end of file +window.addEventListener("load", doOnceLoaded, false); \ No newline at end of file diff --git a/chrome/content/msgListColumn.xul b/chrome/content/msgListColumn.xul index 705e0ed..29470f5 100644 --- a/chrome/content/msgListColumn.xul +++ b/chrome/content/msgListColumn.xul @@ -10,7 +10,6 @@ - - + + diff --git a/mailhops/chrome/content/msgListColumn.xul b/mailhops/chrome/content/msgListColumn.xul new file mode 100644 index 0000000..29470f5 --- /dev/null +++ b/mailhops/chrome/content/msgListColumn.xul @@ -0,0 +1,15 @@ + + + + + + + + + +