Bug 712766: Replace the buildid by an easily readable build date in about:. r=mfinkle

This commit is contained in:
Steffen Wilberg 2011-12-21 23:20:02 +01:00
parent cb8b0e3336
commit e9aa3493de

View File

@ -89,11 +89,24 @@
<div id="aboutDetails">
<p id="license"><b><a href="about:license">&aboutPage.licenseLink;</a>&aboutPage.licenseLinkSuffix;</b> &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/XPCOMUtils.jsm");
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 {
@ -114,15 +127,6 @@
});
} catch (ex) {}
let ua = navigator.userAgent;
if (ua) {
let uaP = document.getElementById("aboutUA");
uaP.appendChild(document.createTextNode(ua));
}
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
#ifdef MOZ_UPDATER
let Updater = {
isChecking: false,