1
0
mirror of https://github.com/MailHops/mailhops-plugin.git synced 2025-05-16 06:10:08 -07:00

Language Pull Requests, Account Messages, Fixed Missing blacklisted icon

This commit is contained in:
Andrew Van Tassel 2017-07-15 15:05:36 -06:00
parent b2f405211c
commit 3c8edf0c22
9 changed files with 75 additions and 25 deletions

View File

@ -1,5 +1,14 @@
# Change Log # Change Log
## 3.1.1 - 2017-07-15
### Added
- Language Pull Requests
- Account Messages
### Fixed
- Missing blacklisted icon in MailHops bar
## 3.1.0 - 2017-02-21 ## 3.1.0 - 2017-02-21
### Fixed ### Fixed

3
PRIVACY.md Normal file
View File

@ -0,0 +1,3 @@
# MailHops Privacy Policy
MailHops parses IP addresses from the Received headers to send to the MailHops service. Please see the MailHops privacy policy for more details. [https://www.mailhops.com/privacy/](https://www.mailhops.com/privacy)

View File

@ -9,7 +9,7 @@ var mailHops =
msgURI: null, msgURI: null,
isLoaded: false, isLoaded: false,
options: { options: {
'version':'MailHops Plugin 3.1.0', 'version':'MailHops Plugin 3.1.1',
'lan':'en', 'lan':'en',
'unit':'mi', 'unit':'mi',
'api_http':'https://', 'api_http':'https://',

View File

@ -9,6 +9,8 @@ var mailHopsDisplay =
mailhopsDataPaneDNSBL: null, mailhopsDataPaneDNSBL: null,
mailhopsResultWeather: null, mailhopsResultWeather: null,
mailhopsUnsubscribe: null, mailhopsUnsubscribe: null,
mailHopsMessage: null,
mailHopsMessageText: null,
mhBox: null, mhBox: null,
options: null, options: null,
@ -21,6 +23,9 @@ var mailHopsDisplay =
this.mailhopsResultWeather = document.getElementById("mailhopsResultWeather"); this.mailhopsResultWeather = document.getElementById("mailhopsResultWeather");
this.mailhopsUnsubscribe = document.getElementById("mailhopsUnsubscribe"); this.mailhopsUnsubscribe = document.getElementById("mailhopsUnsubscribe");
this.resultDetails = document.getElementById("mailhopsDataPaneDetails"); this.resultDetails = document.getElementById("mailhopsDataPaneDetails");
this.mailHopsMessage = document.getElementById("mailHopsMessage");
this.mailHopsMessageText = document.getElementById("mailHopsMessageText");
//auth //auth
this.mailhopsDataPaneSPF = document.getElementById("mailhopsDataPaneSPF"); this.mailhopsDataPaneSPF = document.getElementById("mailhopsDataPaneSPF");
this.mailhopsDataPaneDKIM = document.getElementById("mailhopsDataPaneDKIM"); this.mailhopsDataPaneDKIM = document.getElementById("mailhopsDataPaneDKIM");
@ -47,6 +52,10 @@ var mailHopsDisplay =
mailHopsUtils.launchExternalURL(this.getAttribute('href')); mailHopsUtils.launchExternalURL(this.getAttribute('href'));
}); });
this.mailHopsMessageText.addEventListener("click", function () {
mailHopsUtils.launchExternalURL(this.getAttribute('href'));
});
this.mailhopsUnsubscribe.addEventListener("click", function () { this.mailhopsUnsubscribe.addEventListener("click", function () {
if(this.getAttribute('href')) if(this.getAttribute('href'))
mailHopsUtils.launchExternalURL(this.getAttribute('href')); mailHopsUtils.launchExternalURL(this.getAttribute('href'));
@ -189,6 +198,7 @@ var mailHopsDisplay =
}, },
error: function(status,data){ error: function(status,data){
this.resultText.style.backgroundImage = "url('chrome://mailhops/content/images/auth/error.png')";
if(data && data.error){ if(data && data.error){
this.resultText.setAttribute('value', status+': '+data.error.message); this.resultText.setAttribute('value', status+': '+data.error.message);
this.resultText.setAttribute('tooltiptext',data.error.message); this.resultText.setAttribute('tooltiptext',data.error.message);
@ -375,6 +385,16 @@ var mailHopsDisplay =
this.resultText.setAttribute('value', displayText+' ( '+distanceText+' )'); this.resultText.setAttribute('value', displayText+' ( '+distanceText+' )');
this.resultText.style.backgroundImage = 'url('+image+')'; this.resultText.style.backgroundImage = 'url('+image+')';
if(meta && meta.message){
this.mailHopsMessage.style.display = 'inline';
if(meta.message.text)
this.mailHopsMessageText.value = meta.message.text;
if(meta.message.url)
this.mailHopsMessageText.setAttribute('href', meta.message.url);
} else {
this.mailHopsMessage.style.display = 'none';
}
}, //end route }, //end route
toggleMailHopsBar: function(show){ toggleMailHopsBar: function(show){

View File

@ -14,6 +14,9 @@
<rows id="msgNotificationBar"> <rows id="msgNotificationBar">
<row id="mailhopsNoficationBox" collapsed="false"> <row id="mailhopsNoficationBox" collapsed="false">
<image id="mailhopsLogo" src="chrome://mailhops/content/images/mailhops32.png" width="32" height="32" tooltiptext="&mailhops_route_nav_options_label;"/> <image id="mailhopsLogo" src="chrome://mailhops/content/images/mailhops32.png" width="32" height="32" tooltiptext="&mailhops_route_nav_options_label;"/>
<div id="mailHopsMessage">
<label id="mailHopsMessageText" class="bar-link" value="Join today for metrics and more."></label>
</div>
<hbox id="mailhopsResult" flex="1"> <hbox id="mailhopsResult" flex="1">

View File

@ -34,8 +34,8 @@ var mailHopPreferences = {
document.getElementById("mailhop.unit").selectedIndex = 1; document.getElementById("mailhop.unit").selectedIndex = 1;
//Display Box styles //Display Box styles
document.getElementById("mailhop.bar_color").value = pref.getCharPref("mail.mailHops.bar_color",'#5E7A9B'); document.getElementById("mailhop.bar_color").value = pref.getCharPref("mail.mailHops.bar_color",'#FFF');
document.getElementById("mailhop.font_color").value = pref.getCharPref("mail.mailHops.font_color",'#ffffff'); document.getElementById("mailhop.font_color").value = pref.getCharPref("mail.mailHops.font_color",'#777');
document.getElementById("mailhop.font_size").value = pref.getCharPref("mail.mailHops.font_size",'14px'); document.getElementById("mailhop.font_size").value = pref.getCharPref("mail.mailHops.font_size",'14px');
//Update styles //Update styles
@ -177,7 +177,7 @@ var mailHopPreferences = {
self.valid_api_key=true; self.valid_api_key=true;
document.getElementById("plan-error").style.display = 'none'; document.getElementById("plan-error").style.display = 'none';
// set plan info // set plan info
document.getElementById("plan").value = "Plan: "+data.account.subscriptions.data[0].plan.id; document.getElementById("plan").value = "Plan: "+data.account.subscriptions.data[0].plan.name;
document.getElementById("status").value = "Status: "+data.account.subscriptions.data[0].status; document.getElementById("status").value = "Status: "+data.account.subscriptions.data[0].status;
document.getElementById("rate-limit").value = "Limit: "+data.account.rate.limit; document.getElementById("rate-limit").value = "Limit: "+data.account.rate.limit;
document.getElementById("rate-remaining").value = "Remaining: "+data.account.rate.remaining; document.getElementById("rate-remaining").value = "Remaining: "+data.account.rate.remaining;

View File

@ -489,7 +489,7 @@
Use any <label class="text-link plain" href="https://en.wikipedia.org/wiki/Web_colors" value="HTML color name or Hex code"/>. Use any <label class="text-link plain" href="https://en.wikipedia.org/wiki/Web_colors" value="HTML color name or Hex code"/>.
</description> </description>
<description id="display_preview" style="font-size: 14px; color: #FFF; background: #5E7A9B;"> <description id="display_preview" style="font-size: 14px; color: #777; background: #FFF;">
<image src="chrome://mailhops/content/images/mailhops32.png" width="32" height="32"/> <image src="chrome://mailhops/content/images/mailhops32.png" width="32" height="32"/>
MailHops Bar MailHops Bar
</description> </description>
@ -503,7 +503,7 @@
<rows> <rows>
<row> <row>
<label value="Bar Color"></label> <label value="Bar Color"></label>
<textbox id="mailhop.bar_color" value="#5E7A9B" placeholder="Enter a hex color code"/> <textbox id="mailhop.bar_color" value="#FFF" placeholder="Enter a hex color code"/>
<grid class="grid-color"> <grid class="grid-color">
<columns> <columns>
<column/> <column/>
@ -540,7 +540,7 @@
</row> </row>
<row> <row>
<label value="Font Color"></label> <label value="Font Color"></label>
<textbox id="mailhop.font_color" value="#ffffff" placeholder="Enter a hex color code"/> <textbox id="mailhop.font_color" value="#777" placeholder="Enter a hex color code"/>
<grid class="grid-color"> <grid class="grid-color">
<columns> <columns>
<column/> <column/>
@ -560,7 +560,7 @@
</row> </row>
<row> <row>
<span></span> <span></span>
<button onclick="mailHopPreferences.ResetDisplay('#5E7A9B','#ffffff','14px');" style="text-align:center;">Reset Display</button> <button onclick="mailHopPreferences.ResetDisplay('#FFF','#777','14px');" style="text-align:center;">Reset Display</button>
</row> </row>
</rows> </rows>
</grid> </grid>

View File

@ -1,6 +1,6 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#mailhopsNoficationBox #mailhopsResultText { padding-left:20px; background-repeat: no-repeat; } #mailhopsResultText { padding-left:20px; background-repeat: no-repeat; }
#mailhopsNoficationBox menuitem .menu-iconic-icon { width: 16px; height: 11px; } #mailhopsNoficationBox menuitem .menu-iconic-icon { width: 16px; height: 11px; }
@ -37,7 +37,8 @@
line-height: 24px; line-height: 24px;
font-weight: normal; font-weight: normal;
background: #5E7A9B; background: #5E7A9B;
overflow-x: scroll; display: block;
position: relative;
padding: 5px; padding: 5px;
} }
@ -57,21 +58,21 @@
right: 0; right: 0;
} }
#mailhopsNoficationBox #mailhopsLogo, #mailhopsLogo,
#mailhopsNoficationBox #mailhopsResultText, #mailhopsResultText,
#mailhopsNoficationBox #mailhopsResultWeather, #mailhopsResultWeather,
#mailhopsNoficationBox #mailhopsUnsubscribe, #mailhopsUnsubscribe,
#mailhopsNoficationBox #mailhopsDataPaneDNSBL, #mailhopsDataPaneDNSBL,
#mailhopsNoficationBox #mailhopsDataPaneDKIM, #mailhopsDataPaneDKIM,
#mailhopsNoficationBox #mailhopsDataPaneSPF, #mailhopsDataPaneSPF,
#mailhopsNoficationBox #mailhopsDataPaneMailer { #mailhopsDataPaneMailer {
color: #fff; color: #fff;
} }
#mailhopsNoficationBox #mailhopsLogo, #mailhopsLogo,
#mailhopsNoficationBox #mailhopsResultText, #mailhopsResultText,
#mailhopsNoficationBox #mailhopsResultWeather, #mailhopsResultWeather,
#mailhopsNoficationBox #mailhopsUnsubscribe { #mailhopsUnsubscribe {
cursor: pointer; cursor: pointer;
} }
@ -79,12 +80,26 @@
color: #CCC; color: #CCC;
} }
#mailhopsNoficationBox #mailhopsLogo { #mailhopsLogo {
-webkit-filter: grayscale(100%); -webkit-filter: grayscale(100%);
filter: grayscale(100%); filter: grayscale(100%);
} }
#mailhopsNoficationBox #mailhopsLogo:hover { #mailhopsLogo:hover {
-webkit-filter: none; -webkit-filter: none;
filter: none; filter: none;
} }
#mailHopsMessage {
z-index:10;
border-radius: 10px;
display: none;
position: absolute;
padding:10px;
margin-top:40px;
margin-left: -28px;
width: auto;
border: 1px solid #CCC;
color: #777;
background-color: #FFF;
}

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>3.1.0</em:version> <em:version>3.1.1</em:version>
<em:name>MailHops</em:name> <em:name>MailHops</em:name>
<em:description>MailHops maps the route an email took to get to you. Displaying the senders location, weather, user-agent and authentication used.</em:description> <em:description>MailHops maps the route an email took to get to you. Displaying the senders location, weather, user-agent and authentication used.</em:description>