зеркало из https://github.com/mozilla/gecko-dev.git
Bug 350849: fail gracefully if we're unable to get the releaseNotesURL in about.xhtml (ensure the user agent/build ID is always displayed), patch by Simon B�nzli <zeniko@gmail.com>, r=mconnor
This commit is contained in:
Родитель
e8e16068d1
Коммит
731524153d
|
@ -73,11 +73,14 @@
|
|||
<li>&about.buildconfig.beforeLink; <a href="about:buildconfig">&about.buildconfig.linkTitle;</a> &about.buildconfig.afterLink;</li>
|
||||
<script type="application/x-javascript">
|
||||
// get release notes URL from prefs
|
||||
var formatter = Components.classes["@mozilla.org/browser/URLFormatterService;1"]
|
||||
.getService(Components.interfaces.nsIURLFormatter);
|
||||
var releaseNotesURL = formatter.formatURLPref("app.releaseNotesURL", null);
|
||||
var relnotes = document.getElementById("releaseNotesURL");
|
||||
relnotes.setAttribute("href", releaseNotesURL);
|
||||
try {
|
||||
var formatter = Components.classes["@mozilla.org/browser/URLFormatterService;1"]
|
||||
.getService(Components.interfaces.nsIURLFormatter);
|
||||
var releaseNotesURL = formatter.formatURLPref("app.releaseNotesURL", null);
|
||||
var relnotes = document.getElementById("releaseNotesURL");
|
||||
relnotes.setAttribute("href", releaseNotesURL);
|
||||
}
|
||||
catch (ex) { /* no release notes URL for you without bug 349985 being fixed */ }
|
||||
|
||||
var ua = navigator.userAgent;
|
||||
if (ua) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче