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:
gavin%gavinsharp.com 2006-09-01 16:26:03 +00:00
Родитель e8e16068d1
Коммит 731524153d
1 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -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) {