From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- browser/components/preferences/preferences.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'browser/components/preferences/preferences.js') 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 -- cgit v1.2.3