Loading browser/components/preferences/config/accessibility.mjs +11 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,11 @@ Preferences.addSetting( Preferences.addSetting({ id: "alwaysUnderlineLinks", pref: "layout.css.always_underline_links", // Hide "always underline links" because it can be used for fingerprinting. At // the time of implementation, this is the case with or without RFP, so we // hide this unconditionally. // tor-browser#43117. visible: () => false, }); Preferences.addSetting({ Loading @@ -105,6 +110,12 @@ Preferences.addSetting({ Preferences.addSetting({ id: "useSmoothScrolling", pref: "general.smoothScroll", deps: ["resistFingerprinting"], visible: ({ resistFingerprinting }) => { // Hide "smooth scrolling" when using resist fingerprinting (RFP) because // the preference should be ignored. tor-browser#42070. return !resistFingerprinting.value; }, }); Preferences.addSetting({ id: "useOverlayScrollbars", Loading browser/components/preferences/config/appearance.mjs +13 −1 Original line number Diff line number Diff line Loading @@ -68,11 +68,17 @@ Preferences.addAll([ Preferences.addSetting({ id: "web-appearance-override-warning", deps: ["resistFingerprinting"], setup: emitChange => { FORCED_COLORS_QUERY.addEventListener("change", emitChange); return () => FORCED_COLORS_QUERY.removeEventListener("change", emitChange); }, visible: () => { visible: ({ resistFingerprinting }) => { // Hide web appearance settings when using resist fingerprinting (RFP). // tor-browser#41739. if (resistFingerprinting.value) { return false; } return FORCED_COLORS_QUERY.matches; }, }); Loading @@ -82,6 +88,12 @@ Preferences.addSetting( id: "web-appearance-chooser", themeNames: ["dark", "light", "auto"], pref: "layout.css.prefers-color-scheme.content-override", deps: ["resistFingerprinting"], visible: ({ resistFingerprinting }) => { // Hide web appearance settings when using resist fingerprinting (RFP). // tor-browser#41739. return !resistFingerprinting.value; }, setup(emitChange) { Services.obs.addObserver(emitChange, "look-and-feel-changed"); return () => Loading browser/components/preferences/config/passwords-autofill.mjs +2 −5 Original line number Diff line number Diff line Loading @@ -19,10 +19,6 @@ const FormAutofillUtils = ChromeUtils.importESModule( "resource://gre/modules/shared/FormAutofillUtils.sys.mjs" ).FormAutofillUtils; const { AppConstants } = ChromeUtils.importESModule( "resource://gre/modules/AppConstants.sys.mjs" ); const lazy = XPCOMUtils.declareLazy({ AppConstants: "resource://gre/modules/AppConstants.sys.mjs", OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs", Loading Loading @@ -588,7 +584,8 @@ Preferences.addSetting({ Preferences.addSetting({ id: "allowWindowSSO", pref: "network.http.windows-sso.enabled", visible: () => AppConstants.platform === "win", // Hide Windows SSO (single sign on). tor-browser#40717. visible: () => false, }); Preferences.addSetting({ Loading browser/components/preferences/config/privacy.mjs +23 −7 Original line number Diff line number Diff line Loading @@ -335,7 +335,6 @@ Preferences.addAll([ { id: "privacy.fingerprintingProtection.pbmode", type: "bool" }, // Resist Fingerprinting { id: "privacy.resistFingerprinting", type: "bool" }, { id: "privacy.resistFingerprinting.pbmode", type: "bool" }, // Social tracking Loading Loading @@ -2039,6 +2038,8 @@ if (SECURITY_PRIVACY_STATUS_CARD_ENABLED) { "etpCustomEnabled", ...SECURITY_WARNINGS.map(warning => warning.id), ], // Hide the privacy card. tor-browser#44829. visible: () => false, }); Preferences.addSetting({ Loading @@ -2046,6 +2047,10 @@ if (SECURITY_PRIVACY_STATUS_CARD_ENABLED) { deps: SECURITY_WARNINGS.map(warning => warning.id), _telemetrySent: false, visible(deps) { // Hide the privacy card's warnings. tor-browser#44829. if (lazy.AppConstants.BASE_BROWSER_VERSION) { return false; } const count = Object.values(deps).filter( depSetting => depSetting.visible ).length; Loading Loading @@ -2321,6 +2326,10 @@ Preferences.addSetting({ pref: "privacy.globalprivacycontrol.enabled", deps: ["gpcFunctionalityEnabled"], visible: ({ gpcFunctionalityEnabled }) => { // Hide GPC. tor-browser#42777. if (lazy.AppConstants.BASE_BROWSER_VERSION) { return false; } return gpcFunctionalityEnabled.value; }, }); Loading @@ -2332,6 +2341,13 @@ Preferences.addSetting({ id: "relayIntegration", deps: ["savePasswords", "relayFeature"], visible: () => { // Hide Firefox Relay. tor-browser#43109 and tor-browser#42814. // NOTE: Whilst `FirefoxRelay.isDisabled` is `true` due to preferences we // set for Base Browser, `FirefoxRelay.isAvailable` is also `true` in this // case, hence why we still need to hide this unconditionally. if (lazy.AppConstants.BASE_BROWSER_VERSION) { return false; } return lazy.FirefoxRelay.isAvailable; }, disabled: ({ savePasswords, relayFeature }) => { Loading Loading @@ -3191,7 +3207,8 @@ Preferences.addSetting({ (lazy.AppConstants.platform == "win" || lazy.AppConstants.platform == "macosx") && typeof Services.policies.getActivePolicies()?.Certificates ?.ImportEnterpriseRoots == "undefined" ?.ImportEnterpriseRoots == "undefined" && !lazy.AppConstants.BASE_BROWSER_VERSION ); }, }); Loading Loading @@ -3671,6 +3688,8 @@ Preferences.addSetting({ Preferences.addSetting({ id: "etpStatusBoxGroup", // Hide enhanced tracking protection (ETP). tor-browser#26345. visible: () => false, }); Preferences.addSetting({ Loading Loading @@ -3703,6 +3722,8 @@ Preferences.addSetting({ Preferences.addSetting({ id: "protectionsDashboardLink", // Hide enhanced tracking protection (ETP). tor-browser#26345. visible: () => false, }); Preferences.addSetting({ Loading Loading @@ -3759,11 +3780,6 @@ Preferences.addSetting({ }, }); Preferences.addSetting({ id: "resistFingerprinting", pref: "privacy.resistFingerprinting", }); Preferences.addSetting({ id: "resistFingerprintingPBM", pref: "privacy.resistFingerprinting.pbmode", Loading browser/components/preferences/config/tabs-browsing.mjs +4 −0 Original line number Diff line number Diff line Loading @@ -538,10 +538,14 @@ Preferences.addSetting({ Preferences.addSetting({ id: "cfrRecommendations", pref: "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", // Hide feature recommendation (CFR). tor-browser#43118. visible: () => false, }); Preferences.addSetting({ id: "cfrRecommendations-features", pref: "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", // Hide feature recommendation (CFR). tor-browser#43118. visible: () => false, }); // Browser layout settings Loading Loading
browser/components/preferences/config/accessibility.mjs +11 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,11 @@ Preferences.addSetting( Preferences.addSetting({ id: "alwaysUnderlineLinks", pref: "layout.css.always_underline_links", // Hide "always underline links" because it can be used for fingerprinting. At // the time of implementation, this is the case with or without RFP, so we // hide this unconditionally. // tor-browser#43117. visible: () => false, }); Preferences.addSetting({ Loading @@ -105,6 +110,12 @@ Preferences.addSetting({ Preferences.addSetting({ id: "useSmoothScrolling", pref: "general.smoothScroll", deps: ["resistFingerprinting"], visible: ({ resistFingerprinting }) => { // Hide "smooth scrolling" when using resist fingerprinting (RFP) because // the preference should be ignored. tor-browser#42070. return !resistFingerprinting.value; }, }); Preferences.addSetting({ id: "useOverlayScrollbars", Loading
browser/components/preferences/config/appearance.mjs +13 −1 Original line number Diff line number Diff line Loading @@ -68,11 +68,17 @@ Preferences.addAll([ Preferences.addSetting({ id: "web-appearance-override-warning", deps: ["resistFingerprinting"], setup: emitChange => { FORCED_COLORS_QUERY.addEventListener("change", emitChange); return () => FORCED_COLORS_QUERY.removeEventListener("change", emitChange); }, visible: () => { visible: ({ resistFingerprinting }) => { // Hide web appearance settings when using resist fingerprinting (RFP). // tor-browser#41739. if (resistFingerprinting.value) { return false; } return FORCED_COLORS_QUERY.matches; }, }); Loading @@ -82,6 +88,12 @@ Preferences.addSetting( id: "web-appearance-chooser", themeNames: ["dark", "light", "auto"], pref: "layout.css.prefers-color-scheme.content-override", deps: ["resistFingerprinting"], visible: ({ resistFingerprinting }) => { // Hide web appearance settings when using resist fingerprinting (RFP). // tor-browser#41739. return !resistFingerprinting.value; }, setup(emitChange) { Services.obs.addObserver(emitChange, "look-and-feel-changed"); return () => Loading
browser/components/preferences/config/passwords-autofill.mjs +2 −5 Original line number Diff line number Diff line Loading @@ -19,10 +19,6 @@ const FormAutofillUtils = ChromeUtils.importESModule( "resource://gre/modules/shared/FormAutofillUtils.sys.mjs" ).FormAutofillUtils; const { AppConstants } = ChromeUtils.importESModule( "resource://gre/modules/AppConstants.sys.mjs" ); const lazy = XPCOMUtils.declareLazy({ AppConstants: "resource://gre/modules/AppConstants.sys.mjs", OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs", Loading Loading @@ -588,7 +584,8 @@ Preferences.addSetting({ Preferences.addSetting({ id: "allowWindowSSO", pref: "network.http.windows-sso.enabled", visible: () => AppConstants.platform === "win", // Hide Windows SSO (single sign on). tor-browser#40717. visible: () => false, }); Preferences.addSetting({ Loading
browser/components/preferences/config/privacy.mjs +23 −7 Original line number Diff line number Diff line Loading @@ -335,7 +335,6 @@ Preferences.addAll([ { id: "privacy.fingerprintingProtection.pbmode", type: "bool" }, // Resist Fingerprinting { id: "privacy.resistFingerprinting", type: "bool" }, { id: "privacy.resistFingerprinting.pbmode", type: "bool" }, // Social tracking Loading Loading @@ -2039,6 +2038,8 @@ if (SECURITY_PRIVACY_STATUS_CARD_ENABLED) { "etpCustomEnabled", ...SECURITY_WARNINGS.map(warning => warning.id), ], // Hide the privacy card. tor-browser#44829. visible: () => false, }); Preferences.addSetting({ Loading @@ -2046,6 +2047,10 @@ if (SECURITY_PRIVACY_STATUS_CARD_ENABLED) { deps: SECURITY_WARNINGS.map(warning => warning.id), _telemetrySent: false, visible(deps) { // Hide the privacy card's warnings. tor-browser#44829. if (lazy.AppConstants.BASE_BROWSER_VERSION) { return false; } const count = Object.values(deps).filter( depSetting => depSetting.visible ).length; Loading Loading @@ -2321,6 +2326,10 @@ Preferences.addSetting({ pref: "privacy.globalprivacycontrol.enabled", deps: ["gpcFunctionalityEnabled"], visible: ({ gpcFunctionalityEnabled }) => { // Hide GPC. tor-browser#42777. if (lazy.AppConstants.BASE_BROWSER_VERSION) { return false; } return gpcFunctionalityEnabled.value; }, }); Loading @@ -2332,6 +2341,13 @@ Preferences.addSetting({ id: "relayIntegration", deps: ["savePasswords", "relayFeature"], visible: () => { // Hide Firefox Relay. tor-browser#43109 and tor-browser#42814. // NOTE: Whilst `FirefoxRelay.isDisabled` is `true` due to preferences we // set for Base Browser, `FirefoxRelay.isAvailable` is also `true` in this // case, hence why we still need to hide this unconditionally. if (lazy.AppConstants.BASE_BROWSER_VERSION) { return false; } return lazy.FirefoxRelay.isAvailable; }, disabled: ({ savePasswords, relayFeature }) => { Loading Loading @@ -3191,7 +3207,8 @@ Preferences.addSetting({ (lazy.AppConstants.platform == "win" || lazy.AppConstants.platform == "macosx") && typeof Services.policies.getActivePolicies()?.Certificates ?.ImportEnterpriseRoots == "undefined" ?.ImportEnterpriseRoots == "undefined" && !lazy.AppConstants.BASE_BROWSER_VERSION ); }, }); Loading Loading @@ -3671,6 +3688,8 @@ Preferences.addSetting({ Preferences.addSetting({ id: "etpStatusBoxGroup", // Hide enhanced tracking protection (ETP). tor-browser#26345. visible: () => false, }); Preferences.addSetting({ Loading Loading @@ -3703,6 +3722,8 @@ Preferences.addSetting({ Preferences.addSetting({ id: "protectionsDashboardLink", // Hide enhanced tracking protection (ETP). tor-browser#26345. visible: () => false, }); Preferences.addSetting({ Loading Loading @@ -3759,11 +3780,6 @@ Preferences.addSetting({ }, }); Preferences.addSetting({ id: "resistFingerprinting", pref: "privacy.resistFingerprinting", }); Preferences.addSetting({ id: "resistFingerprintingPBM", pref: "privacy.resistFingerprinting.pbmode", Loading
browser/components/preferences/config/tabs-browsing.mjs +4 −0 Original line number Diff line number Diff line Loading @@ -538,10 +538,14 @@ Preferences.addSetting({ Preferences.addSetting({ id: "cfrRecommendations", pref: "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", // Hide feature recommendation (CFR). tor-browser#43118. visible: () => false, }); Preferences.addSetting({ id: "cfrRecommendations-features", pref: "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", // Hide feature recommendation (CFR). tor-browser#43118. visible: () => false, }); // Browser layout settings Loading