Bug 1889687 - Ensure new Translations settings is hidden form search r=Gijs,settings-reviewers

Ensures that the new Translations Settings subpage
has the `data-hidden-from-search` attribute so that
stubbed content is not discoverable accidentally.

Differential Revision: https://phabricator.services.mozilla.com/D206669
This commit is contained in:
Erik Nordin
2024-04-05 00:30:32 +00:00
parent a628b42232
commit e01cd41e38
2 changed files with 8 additions and 1 deletions

View File

@@ -1918,6 +1918,11 @@ var gMainPane = {
if (
Services.prefs.getBoolPref("browser.translations.newSettingsUI.enable")
) {
const translationsSettings = document.getElementById(
"translations-settings-page"
);
translationsSettings.setAttribute("data-hidden-from-search", "false");
translationsSettings.hidden = false;
gotoPref("translations");
} else {
gSubDialog.open(

View File

@@ -4,9 +4,11 @@
<script src="chrome://browser/content/preferences/translations.js"/>
<div xmlns="http://www.w3.org/1999/xhtml"
<div id="translations-settings-page"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
data-category="paneTranslations"
data-hidden-from-search="true"
hidden="true">
<button id="translations-settings-back-button" class="back-button"