[tbb-commits] [torbutton/maint-1.9.5] Bug 20947: Raise 2016 donation banner limit and fix arrow

gk at torproject.org gk at torproject.org
Mon Dec 12 08:06:50 UTC 2016


commit 6447d7cccd169145941098e0cc7fe10b4ba026cb
Author: Arthur Edelstein <arthuredelstein at gmail.com>
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 b6860d8..4da9a5a 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 76192f4..931dcac 100644
--- a/src/chrome/locale/en/aboutTor.properties
+++ b/src/chrome/locale/en/aboutTor.properties
@@ -20,7 +20,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 9b9a7e6..6b9d3e6 100644
--- a/src/chrome/locale/fr/aboutTor.properties
+++ b/src/chrome/locale/fr/aboutTor.properties
@@ -20,7 +20,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;





More information about the tbb-commits mailing list