1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/content/about.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,32 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +// get release notes and vendor URL from prefs 1.9 +var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] 1.10 + .getService(Components.interfaces.nsIURLFormatter); 1.11 +var releaseNotesURL = formatter.formatURLPref("app.releaseNotesURL"); 1.12 +if (releaseNotesURL != "about:blank") { 1.13 + var relnotes = document.getElementById("releaseNotesURL"); 1.14 + relnotes.setAttribute("href", releaseNotesURL); 1.15 + relnotes.parentNode.removeAttribute("hidden"); 1.16 +} 1.17 + 1.18 +var vendorURL = formatter.formatURLPref("app.vendorURL"); 1.19 +if (vendorURL != "about:blank") { 1.20 + var vendor = document.getElementById("vendorURL"); 1.21 + vendor.setAttribute("href", vendorURL); 1.22 +} 1.23 + 1.24 +// insert the version of the XUL application (!= XULRunner platform version) 1.25 +var versionNum = Components.classes["@mozilla.org/xre/app-info;1"] 1.26 + .getService(Components.interfaces.nsIXULAppInfo) 1.27 + .version; 1.28 +var version = document.getElementById("version"); 1.29 +version.textContent += " " + versionNum; 1.30 + 1.31 +// append user agent 1.32 +var ua = navigator.userAgent; 1.33 +if (ua) { 1.34 + document.getElementById("buildID").textContent += " " + ua; 1.35 +}