tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit dc3e7d461bc4869420ff17547220fd0d07e6ea9b
parent f62d1cfded97d1145f26e5b61f5077d3d4fe6d2f
Author: Tim Giles <tgiles@mozilla.com>
Date:   Tue,  7 Oct 2025 15:58:31 +0000

Bug 1990950 - Remove boilerplate code from privacy.js. r=akulyk

Differential Revision: https://phabricator.services.mozilla.com/D266254

Diffstat:
Mbrowser/components/preferences/privacy.js | 37-------------------------------------
1 file changed, 0 insertions(+), 37 deletions(-)

diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js @@ -2355,41 +2355,6 @@ var gPrivacyPane = { }, /** - * Hides non technical privacy section when all controls within are hidden. - */ - updateNonTechnicalPrivacySectionVisibility() { - let allDisabled = - !Preferences.get("privacy.globalprivacycontrol.functionality.enabled") - .value && !Preferences.get("privacy.donottrackheader.enabled").value; - let nonTechnicalPrivacyGroup = document.getElementById( - "nonTechnicalPrivacyGroup" - ); - if (allDisabled) { - nonTechnicalPrivacyGroup.style.display = "none"; - } else { - nonTechnicalPrivacyGroup.style.display = ""; - } - }, - - /** - * Sets up listeners to control non technical privacy section visibility. - */ - initNonTechnicalPrivacySection() { - // When prefs change that can cause all settings in the section to be hidden - // update visibility state of the entire section. - Preferences.get("privacy.globalprivacycontrol.functionality.enabled").on( - "change", - gPrivacyPane.updateNonTechnicalPrivacySectionVisibility.bind(gPrivacyPane) - ); - Preferences.get("privacy.donottrackheader.enabled").on( - "change", - gPrivacyPane.updateNonTechnicalPrivacySectionVisibility.bind(gPrivacyPane) - ); - // Initial visiblity state. - gPrivacyPane.updateNonTechnicalPrivacySectionVisibility(); - }, - - /** * Sets up the UI for the number of days of history to keep, and updates the * label of the "Clear Now..." button. */ @@ -2403,8 +2368,6 @@ var gPrivacyPane = { initSettingGroup("cookiesAndSiteData"); initSettingGroup("certificates"); - this.initNonTechnicalPrivacySection(); - this._updateSanitizeSettingsButton(); this.initializeHistoryMode(); this.updateHistoryModePane();