Bug 1361969 - Update the URL of "Firefox Support" Link
MozReview-Commit-ID: 1aBPa6Pv9Fs
--- a/browser/components/preferences/in-content/preferences.js
+++ b/browser/components/preferences/in-content/preferences.js
@@ -81,16 +81,20 @@ function init_all() {
init_dynamic_padding();
var initFinished = new CustomEvent("Initialized", {
"bubbles": true,
"cancelable": true
});
document.dispatchEvent(initFinished);
+ let helpButton = document.querySelector(".help-button");
+ let helpUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "preferences";
+ helpButton.setAttribute("href", helpUrl);
+
// Wait until initialization of all preferences are complete before
// notifying observers that the UI is now ready.
Services.obs.notifyObservers(window, "advanced-pane-loaded");
}
// Make the space above the categories list shrink on low window heights
function init_dynamic_padding() {
let categories = document.getElementById("categories");
@@ -164,19 +168,16 @@ function gotoPref(aCategory) {
if (gLastHash == category && !subcategory)
return;
let item = categories.querySelector(".category[value=" + category + "]");
if (!item) {
category = kDefaultCategoryInternalName;
item = categories.querySelector(".category[value=" + category + "]");
}
- let helpButton = document.querySelector(".help-button");
- helpButton.setAttribute("href", getHelpLinkURL(item.getAttribute("helpTopic")));
-
try {
init_category_if_required(category);
} catch (ex) {
Cu.reportError("Error initializing preference category " + category + ": " + ex);
throw ex;
}
let friendlyName = internalPrefCategoryNameToFriendlyName(category);