summaryrefslogtreecommitdiffstats
path: root/browser/components/preferences/preferences.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/preferences/preferences.js')
-rw-r--r--browser/components/preferences/preferences.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
index 31ae84f382..c30a51c67c 100644
--- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js
@@ -204,7 +204,10 @@ function init_all() {
register_module("paneSearch", gSearchPane);
register_module("panePrivacy", gPrivacyPane);
register_module("paneContainers", gContainersPane);
- register_module("paneTranslations", gTranslationsPane);
+
+ if (Services.prefs.getBoolPref("browser.translations.newSettingsUI.enable")) {
+ register_module("paneTranslations", gTranslationsPane);
+ }
if (Services.prefs.getBoolPref("browser.preferences.experimental")) {
// Set hidden based on previous load's hidden value.
document.getElementById("category-experimental").hidden =
@@ -475,7 +478,7 @@ async function spotlight(subcategory, category) {
}
}
-async function scrollAndHighlight(subcategory, category) {
+async function scrollAndHighlight(subcategory) {
let element = document.querySelector(`[data-subcategory="${subcategory}"]`);
if (!element) {
return;
@@ -643,7 +646,7 @@ async function ensureScrollPadding() {
let stickyContainer = document.querySelector(".sticky-container");
let height = await window.browsingContext.topChromeWindow
.promiseDocumentFlushed(() => stickyContainer.clientHeight)
- .catch(err => Cu.reportError); // Can reject if the window goes away.
+ .catch(() => Cu.reportError); // Can reject if the window goes away.
// Make it a bit more, to ensure focus rectangles etc. don't get cut off.
// This being 8px causes us to end up with 90px if the policies container