diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2018-04-13 16:04:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-13 16:04:37 -0400 |
commit | ccb9e8c83452231b0d2c72a6cddf64bb1ef5a643 (patch) | |
tree | 8f46c229047ad9b38122d3a415361403763cc115 /toolkit/content/about.js | |
parent | 501db456d4d84a9345374e9b15775f6e10883a41 (diff) | |
parent | dfe1ae6c3ee84bf5c31bbb1ee05d7ab257c2a23b (diff) | |
download | UXP-ccb9e8c83452231b0d2c72a6cddf64bb1ef5a643.tar UXP-ccb9e8c83452231b0d2c72a6cddf64bb1ef5a643.tar.gz UXP-ccb9e8c83452231b0d2c72a6cddf64bb1ef5a643.tar.lz UXP-ccb9e8c83452231b0d2c72a6cddf64bb1ef5a643.tar.xz UXP-ccb9e8c83452231b0d2c72a6cddf64bb1ef5a643.zip |
Merge pull request #150 from janekptacijarabaci/about_1
moebius#173: Fix up "about:" page
Diffstat (limited to 'toolkit/content/about.js')
-rw-r--r-- | toolkit/content/about.js | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/toolkit/content/about.js b/toolkit/content/about.js index ae467d07a..c27916c10 100644 --- a/toolkit/content/about.js +++ b/toolkit/content/about.js @@ -5,14 +5,24 @@ // get release notes and vendor URL from prefs var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] .getService(Components.interfaces.nsIURLFormatter); -var releaseNotesURL = formatter.formatURLPref("app.releaseNotesURL"); +var releaseNotesURL; +try { + releaseNotesURL = formatter.formatURLPref("app.releaseNotesURL"); +} catch(e) { + releaseNotesURL = "about:blank"; +} if (releaseNotesURL != "about:blank") { var relnotes = document.getElementById("releaseNotesURL"); relnotes.setAttribute("href", releaseNotesURL); relnotes.parentNode.removeAttribute("hidden"); } -var vendorURL = formatter.formatURLPref("app.vendorURL"); +var vendorURL; +try { + vendorURL = formatter.formatURLPref("app.vendorURL"); +} catch(e) { + vendorURL = "about:blank"; +} if (vendorURL != "about:blank") { var vendor = document.getElementById("vendorURL"); vendor.setAttribute("href", vendorURL); @@ -25,8 +35,15 @@ var versionNum = Components.classes["@mozilla.org/xre/app-info;1"] var version = document.getElementById("version"); version.textContent += " " + versionNum; +// insert the buildid of the XUL application +var BuildIDVal = Components.classes["@mozilla.org/xre/app-info;1"] + .getService(Components.interfaces.nsIXULAppInfo) + .appBuildID; +var buildID = document.getElementById("buildID"); +buildID.textContent += " " + BuildIDVal.slice(0,-6); + // append user agent var ua = navigator.userAgent; if (ua) { - document.getElementById("buildID").textContent += " " + ua; + document.getElementById("userAgent").textContent += " " + ua; } |