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 88119 35b1c94b8b073e17dbc65fe864d65ef62b82d0f9
parent 88118 3b6ef730516459b9ebb96dc75b9145dc49a4ed40
child 88120 46a1c807df2b929348214f023d766b9ba951ea84
push id22171
push usermak77@bonardo.net
push dateFri, 02 Mar 2012 13:56:30 +0000
treeherderautoland@343ec916dfd5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs728737
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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"},