diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /browser/components/preferences/preferences.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/preferences/preferences.js')
-rw-r--r-- | browser/components/preferences/preferences.js | 9 |
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 |