Bug 728737 - Include the build date on the XUL Fennec about: page for nightlies [r=mbrubeck]
authorBill Gianopoulos <bill@wg9s.com>
Thu, 01 Mar 2012 14:55:14 -0800
changeset 88318 35b1c94b8b073e17dbc65fe864d65ef62b82d0f9
parent 88317 3b6ef730516459b9ebb96dc75b9145dc49a4ed40
child 88319 46a1c807df2b929348214f023d766b9ba951ea84
push id157
push userMs2ger@gmail.com
push dateWed, 07 Mar 2012 19:27:10 +0000
reviewersmbrubeck
bugs728737
milestone13.0a1
Bug 728737 - Include the build date on the XUL Fennec about: page for nightlies [r=mbrubeck]
mobile/xul/chrome/content/about.xhtml
--- a/mobile/xul/chrome/content/about.xhtml
+++ b/mobile/xul/chrome/content/about.xhtml
@@ -85,16 +85,29 @@
 
     <div id="aboutDetails">
       <p id="license"><a href="about:license">&aboutPage.licenseLink;</a>&aboutPage.licenseLinkSuffix; &logoTrademark;</p>
       <p id="aboutUA"/>
     </div>
 
     <script type="application/javascript;version=1.8"><![CDATA[
       let Ci = Components.interfaces, Cc = Components.classes, Cu = Components.utils, Cr = Components.results;
+      Cu.import("resource://gre/modules/Services.jsm");
+
+      // Include the build date if this is an "a#" (nightly or aurora) build
+#expand const version = "__MOZ_APP_VERSION__";
+      if (/a\d+$/.test(version)) {
+        let buildID = Services.appinfo.appBuildID;
+        let buildDate = buildID.slice(0,4) + "-" + buildID.slice(4,6) + "-" + buildID.slice(6,8);
+        let br = document.createElement("br");
+        let versionPara = document.getElementById("version");
+        versionPara.appendChild(br);
+        let date = document.createTextNode("(" + buildDate + ")");
+        versionPara.appendChild(date);
+      }
 
       // get URLs from prefs
       try {
         let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getService(Ci.nsIURLFormatter);
 
         let links = [
           {id: "releaseNotesURL", pref: "app.releaseNotesURL"},
           {id: "supportURL",      pref: "app.support.baseURL"},