зеркало из https://github.com/mozilla/gecko-dev.git
Bug 514467: fix links in about:firefox, r=mfinkle, a=stuart
This commit is contained in:
Родитель
df2e722d6b
Коммит
791522626d
|
@ -346,8 +346,11 @@ pref("browser.ui.kinetic.decelerationRate", 15);
|
|||
pref("plugin.default_plugin_disabled", true);
|
||||
|
||||
// product URLs
|
||||
pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/%APP%/%VERSION%/releasenotes/");
|
||||
pref("app.support.baseURL", "http://support.mozilla.com/1/%APP%/%VERSION%/%OS%/%LOCALE%/");
|
||||
pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/mobile/%VERSION%/releasenotes/");
|
||||
pref("app.support.baseURL", "http://support.mozilla.com/1/mobile/%VERSION%/%OS%/%LOCALE%/");
|
||||
pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/faq/");
|
||||
pref("app.privacyURL", "http://www.mozilla.com/%LOCALE%/legal/privacy/firefox/mobile/");
|
||||
pref("app.creditsURL", "http://www.mozilla.com/%LOCALE%/mobile/credits");
|
||||
|
||||
// Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
|
||||
pref("security.alternate_certificate_error_page", "certerror");
|
||||
|
|
|
@ -90,8 +90,7 @@
|
|||
<a id="privacyURL">&aboutPage.privacyPolicy.label;</a>
|
||||
<a href="about:rights">&aboutPage.rights.label;</a>
|
||||
<a id="releaseNotesURL">&aboutPage.relNotes.label;</a>
|
||||
<!-- XXX wrong credits - these should point to the fennec specific ones, wherever those end up -->
|
||||
<a href="about:credits">&aboutPage.credits.label;</a>
|
||||
<a id="creditsURL">&aboutPage.credits.label;</a>
|
||||
</div>
|
||||
|
||||
<div id="aboutDetails">
|
||||
|
@ -99,32 +98,33 @@
|
|||
<p id="aboutUA"/>
|
||||
</div>
|
||||
|
||||
<script type="application/javascript">
|
||||
// get release notes URL from prefs
|
||||
<script type="application/javascript;version=1.8"><![CDATA[
|
||||
// get URLs from prefs
|
||||
try {
|
||||
var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
||||
let formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
||||
.getService(Components.interfaces.nsIURLFormatter);
|
||||
|
||||
var releaseNotesURL = formatter.formatURLPref("app.releaseNotesURL");
|
||||
var relnotes = document.getElementById("releaseNotesURL");
|
||||
relnotes.setAttribute("href", releaseNotesURL);
|
||||
|
||||
var supportURL = formatter.formatURLPref("app.support.baseURL");
|
||||
var support = document.getElementById("supportURL");
|
||||
support.setAttribute("href", supportURL);
|
||||
let links = [
|
||||
{id: "releaseNotesURL", pref: "app.releaseNotesURL"},
|
||||
{id: "supportURL", pref: "app.support.baseURL"},
|
||||
{id: "faqURL", pref: "app.faqURL"},
|
||||
{id: "privacyURL", pref: "app.privacyURL"},
|
||||
{id: "creditsURL", pref: "app.creditsURL"},
|
||||
];
|
||||
|
||||
//faqURL - ???
|
||||
//privacyURL - hardcoded to http://www.mozilla.com/legal/privacy/ ?
|
||||
//fennec-specific web credits?
|
||||
}
|
||||
catch (ex) { /* no release notes and vendor URL for you without bug 349985 being fixed */ }
|
||||
links.forEach(function (link) {
|
||||
let url = formatter.formatURLPref(link.pref);
|
||||
let element = document.getElementById(link.id);
|
||||
element.setAttribute("href", url);
|
||||
});
|
||||
} catch (ex) {}
|
||||
|
||||
var ua = navigator.userAgent;
|
||||
let ua = navigator.userAgent;
|
||||
if (ua) {
|
||||
var uaP = document.getElementById("aboutUA");
|
||||
let uaP = document.getElementById("aboutUA");
|
||||
uaP.appendChild(document.createTextNode(ua));
|
||||
}
|
||||
</script>
|
||||
]]></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче