[tor-commits] [torbutton/master] Bug #9587: about:tor lacks the TBB 3.X version number.

mikeperry at torproject.org mikeperry at torproject.org
Mon Sep 30 20:50:14 UTC 2013


commit 38c513dde4ef47d797d1f8b85e50de991db6087b
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Fri Aug 30 22:07:48 2013 -0400

    Bug #9587: about:tor lacks the TBB 3.X version number.
---
 src/chrome/content/aboutTor/aboutTor.xhtml |    1 +
 src/chrome/content/torbutton.js            |   15 +++++++++++++++
 src/chrome/skin/aboutTor.css               |   12 ++++++++++++
 3 files changed, 28 insertions(+)

diff --git a/src/chrome/content/aboutTor/aboutTor.xhtml b/src/chrome/content/aboutTor/aboutTor.xhtml
index e948edc..ce06941 100644
--- a/src/chrome/content/aboutTor/aboutTor.xhtml
+++ b/src/chrome/content/aboutTor/aboutTor.xhtml
@@ -50,6 +50,7 @@ function resizeToolbarIconArrow()
 </head>
 <body dir="&locale.dir;" onload="onLoad();">
 <div id="torstatus" class="top">
+  <div id="torstatus-version"/>
   <div id="torstatus-image"/>
   <div class="hideIfTorOff">
     <h1>&aboutTor.success.label;</h1>
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index ed87a0c..e66e7ef 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -854,6 +854,21 @@ function torbutton_update_abouttor_doc(aDoc, aTorOn, aUpdateNeeded) {
       aDoc.body.setAttribute("torNeedsUpdate", "yes"); 
     else
       aDoc.body.removeAttribute("torNeedsUpdate");
+
+    try
+    {
+      const kBrandBundle = "chrome://branding/locale/brand.properties";
+      let brandBundle = Cc["@mozilla.org/intl/stringbundle;1"]
+                          .getService(Ci.nsIStringBundleService)
+                          .createBundle(kBrandBundle);
+      let productName = brandBundle.GetStringFromName("brandFullName");
+      let tbbVersion = m_tb_prefs.getCharPref("torbrowser.version");
+      let e = aDoc.getElementById("torstatus-version");
+
+      while (e.firstChild)
+        e.removeChild(e.firstChild);
+      e.appendChild(aDoc.createTextNode(productName + '\n' + tbbVersion));
+    } catch (e) {}
   }
 
   return isAboutTor;
diff --git a/src/chrome/skin/aboutTor.css b/src/chrome/skin/aboutTor.css
index b5e8f02..12f8a09 100644
--- a/src/chrome/skin/aboutTor.css
+++ b/src/chrome/skin/aboutTor.css
@@ -34,6 +34,18 @@ body[toron] {
   background-image: -moz-linear-gradient(top, #ffffff, #ffffff 10%, #d5ffd5 50%, #d5ffd5);
 }
 
+#torstatus-version {
+  position: fixed;
+  top: 6px;
+  right: 6px;
+  height: 30px;
+  width: 200px;
+  font-family: "Liberation Sans", Arial, Helvetica, sans-serif;
+  font-size: 1.4em;
+  white-space: pre-wrap;
+  text-align: right;
+}
+
 body[toron] #torstatus-image {
   background-image: url('chrome://torbutton/content/aboutTor/tor-on.png');
 }





More information about the tor-commits mailing list