[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbutton/master] Bug 20947: Raise 2016 donation banner limit and fix arrow
commit 745bb08cc685848469c7ac55a2575bbefa674a2f
Author: Arthur Edelstein <arthuredelstein@xxxxxxxxx>
Date: Sun Dec 11 09:51:37 2016 -0800
Bug 20947: Raise 2016 donation banner limit and fix arrow
Also change the English text to "Please Donate!"
---
src/chrome/content/aboutTor/aboutTor.xhtml | 1 -
src/chrome/content/aboutTor/donation_banner.js | 8 ++++----
src/chrome/locale/en/aboutTor.properties | 2 +-
src/chrome/locale/fr/aboutTor.properties | 2 +-
src/chrome/skin/donation_banner.css | 12 ++----------
5 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/src/chrome/content/aboutTor/aboutTor.xhtml b/src/chrome/content/aboutTor/aboutTor.xhtml
index 2c823b5..6b93bfa 100644
--- a/src/chrome/content/aboutTor/aboutTor.xhtml
+++ b/src/chrome/content/aboutTor/aboutTor.xhtml
@@ -183,7 +183,6 @@ window.addEventListener("pageshow", function() {
<div id="banner-donate-button-text">
<span></span>
</div>
- <div id="banner-donate-button-arrow"></div>
</div>
</div>
</a>
diff --git a/src/chrome/content/aboutTor/donation_banner.js b/src/chrome/content/aboutTor/donation_banner.js
index 2b59fd4..9aa2373 100644
--- a/src/chrome/content/aboutTor/donation_banner.js
+++ b/src/chrome/content/aboutTor/donation_banner.js
@@ -69,12 +69,12 @@ let shouldShowBanner = function () {
Services.prefs.clearUserPref(shownCountPref);
return false;
}
- // Only show banner 10 times.
+ // Only show banner 50 times.
let count = 0;
if (Services.prefs.prefHasUserValue(shownCountPref)) {
count = Services.prefs.getIntPref(shownCountPref);
}
- if (count >= 10) {
+ if (count >= 50) {
return false;
}
Services.prefs.setIntPref(shownCountPref, count+1);
@@ -125,6 +125,7 @@ let updateTextSizes = function () {
fitTextInElement(sel("#banner-heart"));
fitTextInElement(sel("#banner-donate-button-text"));
avoidWidows(sel("#banner-tagline span"));
+ avoidWidows(sel("#banner-donate-button-text"));
};
// Read the tagline with the given index.
@@ -145,8 +146,7 @@ let runDonationBanner = function () {
sel("#banner-heart span").innerText =
gStringBundle.GetStringFromName("aboutTor.donationBanner.heart");
sel("#banner-donate-button-text span").innerHTML =
- gStringBundle.GetStringFromName("aboutTor.donationBanner.donate");
- sel("#banner-donate-button-arrow").innerHTML = "»";
+ gStringBundle.GetStringFromName("aboutTor.donationBanner.donate") + " »";
sel("#banner").style.display = "flex";
sel("#banner-spacer").style.display = "block";
addEventListener("resize", updateTextSizes);
diff --git a/src/chrome/locale/en/aboutTor.properties b/src/chrome/locale/en/aboutTor.properties
index 811073e..c777fdf 100644
--- a/src/chrome/locale/en/aboutTor.properties
+++ b/src/chrome/locale/en/aboutTor.properties
@@ -14,7 +14,7 @@ aboutTor.searchDC.privacy.link=https://disconnect.me/privacy
# The following string is a link which replaces %2$S above.
aboutTor.searchDC.search.link=https://search.disconnect.me/
-aboutTor.donationBanner.donate=Donate Now!
+aboutTor.donationBanner.donate=Please Donate!
aboutTor.donationBanner.heart=Tor is at the heart of Internet freedom
aboutTor.donationBanner.tagline1=Millions of People Depend on Tor for Online Security & Privacy
aboutTor.donationBanner.tagline2=A Network of People Protecting People
diff --git a/src/chrome/locale/fr/aboutTor.properties b/src/chrome/locale/fr/aboutTor.properties
index 03f3e8e..91047ff 100644
--- a/src/chrome/locale/fr/aboutTor.properties
+++ b/src/chrome/locale/fr/aboutTor.properties
@@ -14,7 +14,7 @@ aboutTor.searchDC.privacy.link=https://disconnect.me/privacy
# The following string is a link which replaces %2$S above.
aboutTor.searchDC.search.link=https://search.disconnect.me/
-aboutTor.donationBanner.donate=Faites un don maintenant !
+aboutTor.donationBanner.donate=Faites un don maintenant !
aboutTor.donationBanner.heart=Tor est au cÅ?ur de la liberté sur Internet
aboutTor.donationBanner.tagline1=Des millions de personnes dépendent de Tor pour leur sécurité et la protection de leurs renseignements personnels en ligne
aboutTor.donationBanner.tagline2=Un réseau de personnes qui protège les gens
diff --git a/src/chrome/skin/donation_banner.css b/src/chrome/skin/donation_banner.css
index 1d21641..a678e98 100644
--- a/src/chrome/skin/donation_banner.css
+++ b/src/chrome/skin/donation_banner.css
@@ -95,10 +95,7 @@
height: 50px;
letter-spacing: -0.00em;
opacity: 100%;
- padding-bottom: 5px;
- padding-left: 5px;
- padding-right: 5px;
- padding-top: 5px;
+ padding: 10px;
width: 100px;
}
#banner-donate-button-container:hover {
@@ -115,7 +112,7 @@
font-size: 12px;
font-weight: bold;
height: 100%;
- text-align: center;
+ text-align: start;
width: 100%;
}
#banner-donate-button-text {
@@ -125,11 +122,6 @@
justify-content: center;
flex: 2 2 67%;
}
-#banner-donate-button-arrow {
- flex: 1 1 33%;
- font-size: 24px;
- line-height: 24px;
-}
#banner-donate-button-link {
flex: 0 0 auto;
text-decoration: none;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits