From dc3c0bde16e0a16743a1005e78e80536fa63121c Mon Sep 17 00:00:00 2001 From: daijro Date: Thu, 24 Oct 2024 01:31:56 -0500 Subject: [PATCH] Misc fixes beta.13 - Fixed some memory enhancement prefs not setting correctly. - Bfcache is now completely disabled. This should improve memory, but kills Playwright's page.go_back() and page.go_forward(). To re-enable this, set `browser.sessionhistory.max_entries` to the amount of pages you want to remember. - Moved SanitizeOnShutdown policy to preferences instead. This unlocks clearOnShutdown preferences. #47 - Added experimental memorysaver property that clears all of the memory after each page.goto navigation. Helpful for datacenters running Camoufox, but could potentially break things. - Cursor now starts in a random position on the screen - Fixed screenshots not capturing the full window when a viewport is set by window.innerWidth and window.innerHeight. --- additions/juggler/TargetRegistry.js | 18 +- additions/juggler/protocol/PageHandler.js | 25 +- settings/camoufox.cfg | 895 +++++++++++----------- settings/distribution/policies.json | 1 - settings/properties.json | 1 + upstream.sh | 2 +- 6 files changed, 488 insertions(+), 454 deletions(-) diff --git a/additions/juggler/TargetRegistry.js b/additions/juggler/TargetRegistry.js index 079993b..99665a1 100644 --- a/additions/juggler/TargetRegistry.js +++ b/additions/juggler/TargetRegistry.js @@ -383,7 +383,11 @@ class PageTarget { this._tab = tab; this._linkedBrowser = tab.linkedBrowser; this._browserContext = browserContext; - this._viewportSize = undefined; + // Set the viewport size to Camoufox's default value. + this._viewportSize = { + width: ChromeUtils.camouGetInt("window.innerWidth") || 1280, + height: ChromeUtils.camouGetInt("window.innerHeight") || 720, + };; this._initialDPPX = this._linkedBrowser.browsingContext.overrideDPPX; this._url = 'about:blank'; this._openerId = opener ? opener.id() : undefined; @@ -570,14 +574,12 @@ class PageTarget { // Otherwise, explicitly set page viewport prevales over browser context // default viewport. - // Do not allow default viewport size if Camoufox set it first + // Camoufox is already handling viewport size, so we don't need to set it here. if ( - !this._viewportSize && - this._browserContext.defaultViewportSize && ( - ChromeUtils.camouGetInt("window.outerWidth") || - ChromeUtils.camouGetInt("window.outerHeight") || - ChromeUtils.camouGetInt("window.innerWidth") || - ChromeUtils.camouGetInt("window.innerHeight")) + ChromeUtils.camouGetInt("window.outerWidth") || + ChromeUtils.camouGetInt("window.outerHeight") || + ChromeUtils.camouGetInt("window.innerWidth") || + ChromeUtils.camouGetInt("window.innerHeight") ) { return; } diff --git a/additions/juggler/protocol/PageHandler.js b/additions/juggler/protocol/PageHandler.js index 3c3cd7b..0f68344 100644 --- a/additions/juggler/protocol/PageHandler.js +++ b/additions/juggler/protocol/PageHandler.js @@ -80,8 +80,17 @@ class PageHandler { } this._isDragging = false; - this._lastMousePosition = { x: 0, y: 0 }; - this._lastTrackedPos = { x: 0, y: 0 }; + + // Camoufox: set a random default cursor position + let random_val = (max_val) => Math.floor(Math.random() * max_val); + + // Try to fetch the viewport size + this._defaultCursorPos = { + x: random_val(this._pageTarget._viewportSize.width), + y: random_val(this._pageTarget._viewportSize.height), + }; + this._lastMousePosition = { ...this._defaultCursorPos }; + this._lastTrackedPos = { ...this._defaultCursorPos }; this._reportedFrameIds = new Set(); this._networkEventsForUnreportedFrameIds = new Map(); @@ -423,6 +432,14 @@ class PageHandler { }); unsubscribe(); + if (ChromeUtils.camouGetBool('memorysaver', false)) { + ChromeUtils.camouDebug('Clearing all memory...'); + Services.obs.notifyObservers(null, "child-gc-request"); + Cu.forceGC(); + Services.obs.notifyObservers(null, "child-cc-request"); + Cu.forceCC(); + } + return { navigationId: sameDocumentNavigation ? null : navigationId, }; @@ -558,8 +575,8 @@ class PageHandler { // NOTE: since this won't go inside the renderer, there's no need to wait for ACK. win.windowUtils.sendMouseEvent( 'mousemove', - 0 /* x */, - 0 /* y */, + this._defaultCursorPos.x, + this._defaultCursorPos.y, button, clickCount, modifiers, diff --git a/settings/camoufox.cfg b/settings/camoufox.cfg index bf7d937..e318534 100644 --- a/settings/camoufox.cfg +++ b/settings/camoufox.cfg @@ -2,31 +2,31 @@ // Camoufox functionality // ************ -pref("gfx.bundled-fonts.activate", 1); -pref("extensions.activeThemeID", "firefox-compact-dark@mozilla.org"); +defaultPref("gfx.bundled-fonts.activate", 1); +defaultPref("extensions.activeThemeID", "firefox-compact-dark@mozilla.org"); -pref("devtools.debugger.remote-enabled", true); -pref("devtools.debugger.prompt-connection", false); -pref("privacy.userContext.enabled", true); +defaultPref("devtools.debugger.remote-enabled", true); +defaultPref("devtools.debugger.prompt-connection", false); +defaultPref("privacy.userContext.enabled", true); -pref("browser.sessionstore.max_resumed_crashes", 0); -pref("browser.sessionstore.restore_on_demand", false); -pref("browser.sessionstore.restore_tabs_lazily", false); -pref("devtools.selfxss.count", 100); +defaultPref("browser.sessionstore.max_resumed_crashes", 0); +defaultPref("browser.sessionstore.restore_on_demand", false); +defaultPref("browser.sessionstore.restore_tabs_lazily", false); +defaultPref("devtools.selfxss.count", 100); -pref("media.peerconnection.ice.no_host", true); +defaultPref("media.peerconnection.ice.no_host", true); // Tweaks that undo Playwright: // Force enable content isolation (WAFs can detect this!) -pref("fission.autostart", true); -pref("fission.webContentIsolationStrategy", 2); +defaultPref("fission.autostart", true); +defaultPref("fission.webContentIsolationStrategy", 2); // Use dark theme by default -pref("ui.systemUsesDarkTheme", 1); +defaultPref("ui.systemUsesDarkTheme", 1); // Enable PDFJS -pref("pdfjs.disabled", false); +defaultPref("pdfjs.disabled", false); // ************ // Debloat and speed up Camoufox. @@ -35,493 +35,508 @@ pref("pdfjs.disabled", false); // Debloat (from Peskyfox) // VPN -pref("browser.privatebrowsing.vpnpromourl", ""); // Disable VPN promotions -pref("browser.vpn_promo.enabled", false); +defaultPref("browser.privatebrowsing.vpnpromourl", ""); // Disable VPN promotions +defaultPref("browser.vpn_promo.enabled", false); // Extensions -pref("extensions.getAddons.showPane", false); // HIDDEN - Disable recommendations pane in about:addons -pref("extensions.htmlaboutaddons.recommendations.enabled", false); // Disable recommendations in about:addons -pref("browser.discovery.enabled", false); // Disable Personalized Extension Recommendations -pref("browser.shell.checkDefaultBrowser", false); // Don't check if Firefox is the default browser -pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false); // Disable extension recommendations -pref( +defaultPref("extensions.getAddons.showPane", false); // HIDDEN - Disable recommendations pane in about:addons +defaultPref("extensions.htmlaboutaddons.recommendations.enabled", false); // Disable recommendations in about:addons +defaultPref("browser.discovery.enabled", false); // Disable Personalized Extension Recommendations +defaultPref("browser.shell.checkDefaultBrowser", false); // Don't check if Firefox is the default browser +defaultPref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false); // Disable extension recommendations +defaultPref( "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false ); // Disable feature recommendations // More debloat -pref("browser.preferences.moreFromMozilla", false); // Hide "More from Mozilla" in Settings -pref("browser.aboutConfig.showWarning", false); // Disable warning when opening about:config -pref("browser.startup.homepage_override.mstone", "ignore"); // Disable What's New page after updates -pref("browser.aboutwelcome.enabled", false); // Disable welcome screens -pref("startup.homepage_welcome_url", ""); -pref("startup.homepage_welcome_url.additional", ""); -pref("startup.homepage_override_url", ""); -pref("browser.messaging-system.whatsNewPanel.enabled", false); // Disable What's New toolbar icon -pref("browser.tabs.tabmanager.enabled", false); // Only show tab overflow dropdown when needed -pref("screenshots.browser.component.enabled", false); // Disable new screenshot tool -pref("browser.device-migration.help-menu.hidden", true); +defaultPref("browser.preferences.moreFromMozilla", false); // Hide "More from Mozilla" in Settings +defaultPref("browser.aboutConfig.showWarning", false); // Disable warning when opening about:config +defaultPref("browser.startup.homepage_override.mstone", "ignore"); // Disable What's New page after updates +defaultPref("browser.aboutwelcome.enabled", false); // Disable welcome screens +defaultPref("startup.homepage_welcome_url", ""); +defaultPref("startup.homepage_welcome_url.additional", ""); +defaultPref("startup.homepage_override_url", ""); +defaultPref("browser.messaging-system.whatsNewPanel.enabled", false); // Disable What's New toolbar icon +defaultPref("browser.tabs.tabmanager.enabled", false); // Only show tab overflow dropdown when needed +defaultPref("screenshots.browser.component.enabled", false); // Disable new screenshot tool +defaultPref("browser.device-migration.help-menu.hidden", true); // Theme adjustments -pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); // Enable userChrome/userContent -pref("browser.compactmode.show", true); // Show compact mode option -pref("browser.display.focus_ring_on_anything", true); // Remove focus indicator for links -pref("browser.display.focus_ring_style", 0); -pref("browser.display.focus_ring_width", 0); -pref("layout.css.prefers-color-scheme.content-override", 2); -pref("browser.privateWindowSeparation.enabled", false); // Don't separate private windows in taskbar +defaultPref("toolkit.legacyUserProfileCustomizations.stylesheets", true); // Enable userChrome/userContent +defaultPref("browser.compactmode.show", true); // Show compact mode option +defaultPref("browser.display.focus_ring_on_anything", true); // Remove focus indicator for links +defaultPref("browser.display.focus_ring_style", 0); +defaultPref("browser.display.focus_ring_width", 0); +defaultPref("layout.css.prefers-color-scheme.content-override", 2); +defaultPref("browser.privateWindowSeparation.enabled", false); // Don't separate private windows in taskbar // Cookie banners -pref("cookiebanners.service.mode", 2); // Reject cookie banners if possible -pref("cookiebanners.service.mode.privateBrowsing", 2); +defaultPref("cookiebanners.service.mode", 2); // Reject cookie banners if possible +defaultPref("cookiebanners.service.mode.privateBrowsing", 2); // Translations -pref("browser.translations.enable", false); // Disable Firefox Translations -pref("browser.translations.autoTranslate", false); +defaultPref("browser.translations.enable", false); // Disable Firefox Translations +defaultPref("browser.translations.autoTranslate", false); // Fullscreen -pref("full-screen-api.transition-duration.enter", "0 0"); // Remove fullscreen transition -pref("full-screen-api.transition-duration.leave", "0 0"); -pref("full-screen-api.warning.delay", -1); // Disable fullscreen warning -pref("full-screen-api.warning.timeout", 0); +defaultPref("full-screen-api.transition-duration.enter", "0 0"); // Remove fullscreen transition +defaultPref("full-screen-api.transition-duration.leave", "0 0"); +defaultPref("full-screen-api.warning.delay", -1); // Disable fullscreen warning +defaultPref("full-screen-api.warning.timeout", 0); // URL bar -pref("browser.tabs.firefox-view", false); // Disable Firefox view -pref("browser.urlbar.suggest.history", false); // Minimize URL bar suggestions -pref("browser.urlbar.suggest.bookmark", false); -pref("browser.urlbar.suggest.clipboard", false); -pref("browser.urlbar.suggest.openpage", false); -pref("browser.urlbar.suggest.engines", false); -pref("browser.urlbar.suggest.searches", false); -pref("browser.urlbar.quickactions.enabled", false); -pref("browser.urlbar.shortcuts.quickactions", false); -pref("browser.urlbar.suggest.weather", false); -pref("browser.urlbar.weather.ignoreVPN", false); -pref("browser.urlbar.suggest.calculator", false); -pref("browser.urlbar.unitConversion.enabled", false); -pref("browser.urlbar.suggest.topsites", false); -pref("browser.urlbar.trending.featureGate", false); -pref("browser.urlbar.suggest.trending", false); -pref("browser.urlbar.addons.featureGate", false); // [FF115+] -pref("browser.urlbar.mdn.featureGate", false); // [FF117+] [HIDDEN PREF] -pref("browser.urlbar.pocket.featureGate", false); // [FF116+] [DEFAULT: false] -pref("browser.urlbar.weather.featureGate", false); // [FF108+] [DEFAULT: false] -pref("browser.urlbar.clipboard.featureGate", false); // [FF118+] [DEFAULT: true FF125+] -pref("browser.urlbar.yelp.featureGate", false); // [FF124+] [DEFAULT: false] -pref("browser.urlbar.autoFill", false); // [DEFAULT] -pref("browser.urlbar.autoFill.adaptiveHistory.enabled", false); -pref("browser.urlbar.maxRichResults", 0); // Disable URL bar dropdown results +defaultPref("browser.tabs.firefox-view", false); // Disable Firefox view +defaultPref("browser.urlbar.suggest.history", false); // Minimize URL bar suggestions +defaultPref("browser.urlbar.suggest.bookmark", false); +defaultPref("browser.urlbar.suggest.clipboard", false); +defaultPref("browser.urlbar.suggest.openpage", false); +defaultPref("browser.urlbar.suggest.engines", false); +defaultPref("browser.urlbar.suggest.searches", false); +defaultPref("browser.urlbar.quickactions.enabled", false); +defaultPref("browser.urlbar.shortcuts.quickactions", false); +defaultPref("browser.urlbar.suggest.weather", false); +defaultPref("browser.urlbar.weather.ignoreVPN", false); +defaultPref("browser.urlbar.suggest.calculator", false); +defaultPref("browser.urlbar.unitConversion.enabled", false); +defaultPref("browser.urlbar.suggest.topsites", false); +defaultPref("browser.urlbar.trending.featureGate", false); +defaultPref("browser.urlbar.suggest.trending", false); +defaultPref("browser.urlbar.addons.featureGate", false); // [FF115+] +defaultPref("browser.urlbar.mdn.featureGate", false); // [FF117+] [HIDDEN PREF] +defaultPref("browser.urlbar.pocket.featureGate", false); // [FF116+] [DEFAULT: false] +defaultPref("browser.urlbar.weather.featureGate", false); // [FF108+] [DEFAULT: false] +defaultPref("browser.urlbar.clipboard.featureGate", false); // [FF118+] [DEFAULT: true FF125+] +defaultPref("browser.urlbar.yelp.featureGate", false); // [FF124+] [DEFAULT: false] +defaultPref("browser.urlbar.autoFill", false); // [DEFAULT] +defaultPref("browser.urlbar.autoFill.adaptiveHistory.enabled", false); +defaultPref("browser.urlbar.maxRichResults", 0); // Disable URL bar dropdown results // Text fragments -pref("dom.text_fragments.enabled", false); +defaultPref("dom.text_fragments.enabled", false); // Autoplay -pref("media.autoplay.default", 0); // Allow autoplay -pref("media.block-autoplay-until-in-foreground", true); -pref("media.autoplay.blocking_policy", 0); +defaultPref("media.autoplay.default", 0); // Allow autoplay +defaultPref("media.block-autoplay-until-in-foreground", true); +defaultPref("media.autoplay.blocking_policy", 0); // Startup/New Tab -pref("browser.startup.page", 0); // Show blank page on startup -pref("browser.startup.homepage", "about:blank"); -pref("browser.newtabpage.enabled", false); // Disable activity stream on new tab -pref("browser.newtabpage.activity-stream.discoverystream.enabled", false); -pref("browser.newtabpage.activity-stream.showSearch", true); // NTP Web Search [DEFAULT] -pref("browser.newtabpage.activity-stream.feeds.topsites", false); // Shortcuts -pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); // Shortcuts > Sponsored shortcuts [FF83+] -pref("browser.newtabpage.activity-stream.showWeather", false); // Weather [FF128+ NIGHTLY] -pref("browser.newtabpage.activity-stream.system.showWeather", false); // Weather [FF128+ NIGHTLY] -pref("browser.newtabpage.activity-stream.showSponsored", false); // Sponsored Stories [FF58+] -pref("browser.newtabpage.activity-stream.feeds.section.highlights", false); // Recent Activity [DEFAULT] -pref( +defaultPref("browser.startup.page", 0); // Show blank page on startup +defaultPref("browser.startup.homepage", "about:blank"); +defaultPref("browser.newtabpage.enabled", false); // Disable activity stream on new tab +defaultPref("browser.newtabpage.activity-stream.discoverystream.enabled", false); +defaultPref("browser.newtabpage.activity-stream.showSearch", true); // NTP Web Search [DEFAULT] +defaultPref("browser.newtabpage.activity-stream.feeds.topsites", false); // Shortcuts +defaultPref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); // Shortcuts > Sponsored shortcuts [FF83+] +defaultPref("browser.newtabpage.activity-stream.showWeather", false); // Weather [FF128+ NIGHTLY] +defaultPref("browser.newtabpage.activity-stream.system.showWeather", false); // Weather [FF128+ NIGHTLY] +defaultPref("browser.newtabpage.activity-stream.showSponsored", false); // Sponsored Stories [FF58+] +defaultPref("browser.newtabpage.activity-stream.feeds.section.highlights", false); // Recent Activity [DEFAULT] +defaultPref( "browser.newtabpage.activity-stream.section.highlights.includeBookmarks", false ); -pref( +defaultPref( "browser.newtabpage.activity-stream.section.highlights.includeDownloads", false ); -pref( +defaultPref( "browser.newtabpage.activity-stream.section.highlights.includePocket", false ); -pref( +defaultPref( "browser.newtabpage.activity-stream.section.highlights.includeVisited", false ); -pref("browser.newtabpage.activity-stream.feeds.snippets", false); // [DEFAULT] -pref("browser.newtabpage.activity-stream.newtabWallpapers.enabled", false); // Wallpapers -pref("browser.newtabpage.activity-stream.default.sites", ""); -pref("browser.toolbars.bookmarks.visibility", "newtab"); +defaultPref("browser.newtabpage.activity-stream.feeds.snippets", false); // [DEFAULT] +defaultPref("browser.newtabpage.activity-stream.newtabWallpapers.enabled", false); // Wallpapers +defaultPref("browser.newtabpage.activity-stream.default.sites", ""); +defaultPref("browser.toolbars.bookmarks.visibility", "newtab"); // Pocket -pref("extensions.pocket.enabled", false); // Disable Pocket integration -pref("extensions.pocket.api", " "); -pref("extensions.pocket.oAuthConsumerKey", " "); -pref("extensions.pocket.site", " "); -pref("extensions.pocket.showHome", false); +defaultPref("extensions.pocket.enabled", false); // Disable Pocket integration +defaultPref("extensions.pocket.api", " "); +defaultPref("extensions.pocket.oAuthConsumerKey", " "); +defaultPref("extensions.pocket.site", " "); +defaultPref("extensions.pocket.showHome", false); // Downloads -pref("browser.download.always_ask_before_handling_new_types", true); -pref("browser.download.autohideButton", true); -pref("browser.download.alwaysOpenPanel", false); -pref("browser.download.manager.addToRecentDocs", false); +defaultPref("browser.download.always_ask_before_handling_new_types", true); +defaultPref("browser.download.autohideButton", true); +defaultPref("browser.download.alwaysOpenPanel", false); +defaultPref("browser.download.manager.addToRecentDocs", false); // PDF -pref("browser.helperApps.showOpenOptionForPdfJS", false); -pref("browser.download.open_pdf_attachments_inline", false); -pref("pdfjs.sidebarViewOnLoad", 0); +defaultPref("browser.helperApps.showOpenOptionForPdfJS", false); +defaultPref("browser.download.open_pdf_attachments_inline", false); +defaultPref("pdfjs.sidebarViewOnLoad", 0); // Miscellaneous -pref("identity.fxaccounts.enabled", false); -pref("browser.bookmarks.openInTabClosesMenu", false); -pref("browser.menu.showViewImageInfo", false); -pref("findbar.highlightAll", false); -pref("layout.word_select.eat_space_to_next_word", false); -pref("dom.popup_allowed_events", "click dblclick mousedown pointerdown"); -// pref("dom.disable_open_during_load", false); -pref("privacy.popups.showBrowserMessage", false); -pref("browser.tabs.cardPreview.enabled", false); -pref("browser.backspace_action", 2); -pref("reader.parse-on-load.enabled", false); -pref("ui.key.menuAccessKeyFocuses", false); -pref("layout.spellcheckDefault", 0); -pref("ui.SpellCheckerUnderlineStyle", 1); -pref("browser.bookmarks.max_backups", 1); -pref("browser.zoom.full", false); -pref("print.tab_modal.enabled", false); -pref("browser.tabs.tabMinWidth", 120); -pref("layout.css.always_underline_links", true); +defaultPref("identity.fxaccounts.enabled", false); +defaultPref("browser.bookmarks.openInTabClosesMenu", false); +defaultPref("browser.menu.showViewImageInfo", false); +defaultPref("findbar.highlightAll", false); +defaultPref("layout.word_select.eat_space_to_next_word", false); +defaultPref("dom.popup_allowed_events", "click dblclick mousedown pointerdown"); +// defaultPref("dom.disable_open_during_load", false); +defaultPref("privacy.popups.showBrowserMessage", false); +defaultPref("browser.tabs.cardPreview.enabled", false); +defaultPref("browser.backspace_action", 2); +defaultPref("reader.parse-on-load.enabled", false); +defaultPref("ui.key.menuAccessKeyFocuses", false); +defaultPref("layout.spellcheckDefault", 0); +defaultPref("ui.SpellCheckerUnderlineStyle", 1); +defaultPref("browser.bookmarks.max_backups", 1); +defaultPref("browser.zoom.full", false); +defaultPref("print.tab_modal.enabled", false); +defaultPref("browser.tabs.tabMinWidth", 120); +defaultPref("layout.css.always_underline_links", true); // No WebGL -pref("webgl.disabled", true); +defaultPref("webgl.disabled", true); // Force software rendering -pref("webgl.forbid-hardware", true); -pref("webgl.forbid-software", false); +defaultPref("webgl.forbid-hardware", true); +defaultPref("webgl.forbid-software", false); // Debloat pt.2 (from Librewolf) // Forms -pref("signon.rememberSignons", false); -pref("signon.autofillForms", false); -// pref("extensions.formautofill.addresses.enabled", false); -// pref("extensions.formautofill.creditCards.enabled", false); -pref("signon.formlessCapture.enabled", false); +defaultPref("signon.rememberSignons", false); +defaultPref("signon.autofillForms", false); +// defaultPref("extensions.formautofill.addresses.enabled", false); +// defaultPref("extensions.formautofill.creditCards.enabled", false); +defaultPref("signon.formlessCapture.enabled", false); // Remove shopping -pref("browser.shopping.experience2023.enabled", false); -pref("browser.shopping.experience2023.optedIn", 2); -pref("browser.shopping.experience2023.active", false); +defaultPref("browser.shopping.experience2023.enabled", false); +defaultPref("browser.shopping.experience2023.optedIn", 2); +defaultPref("browser.shopping.experience2023.active", false); // Remove first launch -pref("browser.uitour.enabled", false); -pref("browser.uitour.url", ""); +defaultPref("browser.uitour.enabled", false); +defaultPref("browser.uitour.url", ""); // disable telemetry in Firefox Home -pref("browser.newtabpage.activity-stream.feeds.telemetry", false); -pref("browser.newtabpage.activity-stream.telemetry", false); +defaultPref("browser.newtabpage.activity-stream.feeds.telemetry", false); +defaultPref("browser.newtabpage.activity-stream.telemetry", false); // hide stories and sponsored content from Firefox Home -pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); -pref( +defaultPref("browser.newtabpage.activity-stream.feeds.section.topstories", false); +defaultPref( "browser.newtabpage.activity-stream.feeds.section.topstories.options", '{"hidden":true}' ); // clean about -pref("browser.contentblocking.report.lockwise.enabled", false); -pref("browser.contentblocking.report.hide_vpn_banner", true); -pref("browser.contentblocking.report.vpn.enabled", false); -pref("browser.contentblocking.report.show_mobile_app", false); -pref("browser.promo.focus.enabled", false); -pref("lightweightThemes.getMoreURL", ""); // disable button to get more themes -pref("browser.topsites.useRemoteSetting", false); // hide sponsored shortcuts button +defaultPref("browser.contentblocking.report.lockwise.enabled", false); +defaultPref("browser.contentblocking.report.hide_vpn_banner", true); +defaultPref("browser.contentblocking.report.vpn.enabled", false); +defaultPref("browser.contentblocking.report.show_mobile_app", false); +defaultPref("browser.promo.focus.enabled", false); +defaultPref("lightweightThemes.getMoreURL", ""); // disable button to get more themes +defaultPref("browser.topsites.useRemoteSetting", false); // hide sponsored shortcuts button // Logging -// pref("browser.dom.window.dump.enabled", false); -// pref("devtools.console.stdout.chrome", false); // Breaks Playwright -pref("camoufox.debugger.force_detach", false); -pref("camoufox.console.logging_disabled", false); +// defaultPref("browser.dom.window.dump.enabled", false); +// defaultPref("devtools.console.stdout.chrome", false); // Breaks Playwright +defaultPref("camoufox.debugger.force_detach", false); +defaultPref("camoufox.console.logging_disabled", false); -pref( +defaultPref( "camoufox.uBO.assetsBootstrapLocation", "https://gitlab.com/librewolf-community/browser/source/-/raw/main/assets/uBOAssets.json" ); // Sanitize -pref("privacy.sanitize.timeSpan", 0); +defaultPref("privacy.sanitize.timeSpan", 0); // Extensions -pref("extensions.webextensions.restrictedDomains", ""); -pref("extensions.enabledScopes", 5); // hidden -pref("extensions.postDownloadThirdPartyPrompt", false); -pref("extensions.quarantinedDomains.enabled", false); -pref("extensions.systemAddon.update.enabled", false); -pref("extensions.systemAddon.update.url", ""); -pref("extensions.webcompat-reporter.enabled", false); -pref("extensions.webcompat-reporter.newIssueEndpoint", ""); -pref("privacy.history.custom", true); -pref("browser.privatebrowsing.autostart", false); -pref("browser.formfill.enable", false); // disable form history +defaultPref("extensions.webextensions.restrictedDomains", ""); +defaultPref("extensions.enabledScopes", 5); // hidden +defaultPref("extensions.postDownloadThirdPartyPrompt", false); +defaultPref("extensions.quarantinedDomains.enabled", false); +defaultPref("extensions.systemAddon.update.enabled", false); +defaultPref("extensions.systemAddon.update.url", ""); +defaultPref("extensions.webcompat-reporter.enabled", false); +defaultPref("extensions.webcompat-reporter.newIssueEndpoint", ""); +defaultPref("privacy.history.custom", true); +defaultPref("browser.privatebrowsing.autostart", false); +defaultPref("browser.formfill.enable", false); // disable form history // Remove all telementry -pref("toolkit.telemetry.unified", false); // master switch -pref("toolkit.telemetry.enabled", false); // master switch -pref("toolkit.telemetry.server", "data:,"); -pref("toolkit.telemetry.archive.enabled", false); -pref("toolkit.telemetry.newProfilePing.enabled", false); -pref("toolkit.telemetry.updatePing.enabled", false); -pref("toolkit.telemetry.firstShutdownPing.enabled", false); -pref("toolkit.telemetry.shutdownPingSender.enabled", false); -pref("toolkit.telemetry.bhrPing.enabled", false); -pref("toolkit.telemetry.cachedClientID", ""); -pref("toolkit.telemetry.previousBuildID", ""); -pref("toolkit.telemetry.server_owner", ""); -pref("toolkit.coverage.opt-out", true); // hidden -pref("toolkit.telemetry.coverage.opt-out", true); // hidden -pref("toolkit.coverage.enabled", false); -pref("toolkit.coverage.endpoint.base", ""); -pref("toolkit.crashreporter.infoURL", ""); -pref("datareporting.healthreport.uploadEnabled", false); -pref("security.protectionspopup.recordEventTelemetry", false); -pref("browser.ping-centre.telemetry", false); +defaultPref("toolkit.telemetry.unified", false); // master switch +defaultPref("toolkit.telemetry.enabled", false); // master switch +defaultPref("toolkit.telemetry.server", "data:,"); +defaultPref("toolkit.telemetry.archive.enabled", false); +defaultPref("toolkit.telemetry.newProfilePing.enabled", false); +defaultPref("toolkit.telemetry.updatePing.enabled", false); +defaultPref("toolkit.telemetry.firstShutdownPing.enabled", false); +defaultPref("toolkit.telemetry.shutdownPingSender.enabled", false); +defaultPref("toolkit.telemetry.bhrPing.enabled", false); +defaultPref("toolkit.telemetry.cachedClientID", ""); +defaultPref("toolkit.telemetry.previousBuildID", ""); +defaultPref("toolkit.telemetry.server_owner", ""); +defaultPref("toolkit.coverage.opt-out", true); // hidden +defaultPref("toolkit.telemetry.coverage.opt-out", true); // hidden +defaultPref("toolkit.coverage.enabled", false); +defaultPref("toolkit.coverage.endpoint.base", ""); +defaultPref("toolkit.crashreporter.infoURL", ""); +defaultPref("datareporting.healthreport.uploadEnabled", false); +defaultPref("security.protectionspopup.recordEventTelemetry", false); +defaultPref("browser.ping-centre.telemetry", false); // opt-out of normandy and studies -pref("app.normandy.enabled", false); -pref("app.normandy.api_url", ""); -pref("app.shield.optoutstudies.enabled", false); -pref("network.protocol-handler.external.ms-windows-store", false); // prevent links from launching windows store +defaultPref("app.normandy.enabled", false); +defaultPref("app.normandy.api_url", ""); +defaultPref("app.shield.optoutstudies.enabled", false); +defaultPref("network.protocol-handler.external.ms-windows-store", false); // prevent links from launching windows store // disable crash report -pref("browser.tabs.crashReporting.sendReport", false); -pref("breakpad.reportURL", ""); +defaultPref("browser.tabs.crashReporting.sendReport", false); +defaultPref("breakpad.reportURL", ""); // disable connectivity checks -pref("network.connectivity-service.enabled", false); +defaultPref("network.connectivity-service.enabled", false); // disable captive portal -pref("network.captive-portal-service.enabled", false); -pref("captivedetect.canonicalURL", ""); +defaultPref("network.captive-portal-service.enabled", false); +defaultPref("captivedetect.canonicalURL", ""); // Speed up (from Fastfox) -pref("image.mem.decode_bytes_at_a_time", 32768); // default=16384; alt=65536; chunk size for calls to the image decoders -pref("media.memory_cache_max_size", 65536); // default=8192; AF=65536; alt=131072 -pref("network.http.max-connections", 1800); // default=900 -pref("network.http.max-persistent-connections-per-server", 10); // default=6; download connections; anything above 10 is excessive -pref("network.http.max-urgent-start-excessive-connections-per-host", 5); // default=3 -pref("network.http.pacing.requests.enabled", false); -pref("network.ssl_tokens_cache_capacity", 10240); // default=2048; more TLS token caching (fast reconnects) -pref("network.dns.disablePrefetch", true); -pref("network.dns.disablePrefetchFromHTTPS", true); // (FF127+ false) -pref("network.prefetch-next", false); -pref("network.predictor.enabled", false); -pref("layout.css.grid-template-masonry-value.enabled", true); -pref("dom.enable_web_task_scheduling", true); -pref("dom.security.sanitizer.enabled", true); -pref("browser.preferences.defaultPerformanceSettings.enabled", false); -pref("editor.truncate_user_pastes", false); -pref("browser.places.interactions.enabled", false); +defaultPref("image.mem.decode_bytes_at_a_time", 32768); // default=16384; alt=65536; chunk size for calls to the image decoders +defaultPref("media.memory_cache_max_size", 65536); // default=8192; AF=65536; alt=131072 +defaultPref("network.http.max-connections", 1800); // default=900 +defaultPref("network.http.max-persistent-connections-per-server", 10); // default=6; download connections; anything above 10 is excessive +defaultPref("network.http.max-urgent-start-excessive-connections-per-host", 5); // default=3 +defaultPref("network.http.pacing.requests.enabled", false); +defaultPref("network.ssl_tokens_cache_capacity", 10240); // default=2048; more TLS token caching (fast reconnects) +defaultPref("network.dns.disablePrefetch", true); +defaultPref("network.dns.disablePrefetchFromHTTPS", true); // (FF127+ false) +defaultPref("network.prefetch-next", false); +defaultPref("network.predictor.enabled", false); +defaultPref("layout.css.grid-template-masonry-value.enabled", true); +defaultPref("dom.enable_web_task_scheduling", true); +defaultPref("dom.security.sanitizer.enabled", true); +defaultPref("browser.preferences.defaultPerformanceSettings.enabled", false); +defaultPref("editor.truncate_user_pastes", false); +defaultPref("browser.places.interactions.enabled", false); // Reduce memory // Source: https://gist.github.com/RubenKelevra/fd66c2f856d703260ecdf0379c4f59db -// pref("dom.ipc.processCount", 1); // only load 1 process -// pref("dom.ipc.processCount.webIsolated", 1); // only load 1 process +// defaultPref("dom.ipc.processCount", 1); // only load 1 process +// defaultPref("dom.ipc.processCount.webIsolated", 1); // only load 1 process -pref("privacy.partition.network_state", false); // Disable network seperations +defaultPref("privacy.partition.network_state", false); // Disable network seperations // Source: https://github.com/Floorp-Projects/Floorp/issues/140 -pref("browser.sessionstore.max_tabs_undo", 0); -pref("browser.sessionstore.max_windows_undo", 0); -pref("browser.sessionstore.resuming_after_os_restart", false); -pref("browser.sessionstore.resume_session_once", false); -pref("browser.sessionstore.upgradeBackup.maxUpgradeBackups", 0); +defaultPref("browser.sessionstore.max_tabs_undo", 0); +defaultPref("browser.sessionstore.max_windows_undo", 0); +defaultPref("browser.sessionstore.resuming_after_os_restart", false); +defaultPref("browser.sessionstore.resume_session_once", false); +defaultPref("browser.sessionstore.upgradeBackup.maxUpgradeBackups", 0); // Turn off bfcache -pref("browser.sessionhistory.max_entries", 0); -pref("browser.sessionhistory.max_total_viewers", 0); -pref("browser.fullscreen.autohide", false); +defaultPref("browser.sessionhistory.max_entries", 0); +defaultPref("browser.sessionhistory.max_total_viewers", 0); +defaultPref("browser.fullscreen.autohide", false); // Cache -// pref("browser.cache.disk.max_entry_size", 128); // Limit disk cache size -pref("browser.cache.memory.enable", false); // Disable memory cache -// pref("browser.cache.disk.enable", false); // Disable disk cache -pref("browser.cache.disk_cache_ssl", false); // Disable disk cache for SSL -pref("browser.cache.offline.enable", false); // Disable offline cache -pref("browser.cache.offline.capacity", 0); -pref("browser.cache.disk.smart_size.enabled", false); // Disables cache size auto-tuning +// defaultPref("browser.cache.disk.max_entry_size", 128); // Limit disk cache size +defaultPref("browser.cache.memory.enable", false); // Disable memory cache +// defaultPref("browser.cache.disk.enable", false); // Disable disk cache +defaultPref("browser.cache.disk_cache_ssl", false); // Disable disk cache for SSL +defaultPref("browser.cache.offline.enable", false); // Disable offline cache +defaultPref("browser.cache.offline.capacity", 0); +defaultPref("browser.cache.disk.smart_size.enabled", false); // Disables cache size auto-tuning // Release memory after closing tabs -pref("memory.free_dirty_pages", true); +defaultPref("memory.free_dirty_pages", true); // New tab -pref("browser.newtabpage.enhanced", false); -pref("datareporting.sessions.current.clean", true); +defaultPref("browser.newtabpage.enhanced", false); +defaultPref("datareporting.sessions.current.clean", true); // Session storage -pref("browser.sessionstore.privacy_level", 2); +defaultPref("browser.sessionstore.privacy_level", 2); // Bookmark bar -pref("browser.toolbars.bookmarks.visibility", "never"); - -// Sanitize (Firedragon) -pref("privacy.clearOnShutdown.siteSettings", true); // Site Preference -pref("privacy.clearOnShutdown.cookies", true); -pref("privacy.clearOnShutdown.offlineApps", true); -pref("privacy.clearOnShutdown.downloads", true); -pref("privacy.clearOnShutdown.formdata", true); // Form & Search History -pref("privacy.clearOnShutdown.sessions", true); // Active Logins -pref("privacy.clearOnShutdown.history", true); // Browsing & Download History -pref("privacy.sanitize.sanitizeOnShutdown", true); +defaultPref("browser.toolbars.bookmarks.visibility", "never"); + +// Sanitize (from the SanitizeOnShutdown pref) +// https://searchfox.org/mozilla-central/source/browser/components/enterprisepolicies/Policies.sys.mjs#2088 +defaultPref("privacy.clearOnShutdown.cache", true); +defaultPref("privacy.clearOnShutdown.cookies", true); +defaultPref("privacy.clearOnShutdown.downloads", true); +defaultPref("privacy.clearOnShutdown.formdata", true); // Form & Search History +defaultPref("privacy.clearOnShutdown.history", true); // Browsing & Download History +defaultPref("privacy.clearOnShutdown.offlineApps", true); +defaultPref("privacy.clearOnShutdown.openWindows", true); // Opened windows will not be restored +defaultPref("privacy.clearOnShutdown.sessions", true); // Active Logins +defaultPref("privacy.clearOnShutdown.siteSettings", true); // Site Preference + +// v2 +defaultPref("privacy.clearOnShutdown_v2.cache", true); +defaultPref("privacy.clearOnShutdown_v2.cookiesAndStorage", true); +defaultPref("privacy.clearOnShutdown_v2.historyFormDataAndDownloads", true); +defaultPref("privacy.clearOnShutdown_v2.siteSettings", true); + +defaultPref("privacy.sanitize.sanitizeOnShutdown", true); // Clipboard -pref("dom.event.clipboardevents.enabled", false); // disable user triggered clipboard access +defaultPref("dom.event.clipboardevents.enabled", false); // disable user triggered clipboard access // Fingerprinting -pref("privacy.resistFingerprinting", false); // This will actually hurt fingerprinting. -// pref("privacy.resistFingerprinting.block_mozAddonManager", true); // prevents rfp from breaking AMO -pref("media.navigator.enabled", false); // Camoufox does not support spoofing this yet. Best to hide. +defaultPref("privacy.resistFingerprinting", false); // This will actually hurt fingerprinting. +// defaultPref("privacy.resistFingerprinting.block_mozAddonManager", true); // prevents rfp from breaking AMO +defaultPref("media.navigator.enabled", false); // Camoufox does not support spoofing this yet. Best to hide. // Theming (from Firefox-UI-Fix) -pref("userChrome.tab.connect_to_window", true); // Original, Photon -pref("userChrome.tab.color_like_toolbar", true); // Original, Photon +defaultPref("userChrome.tab.connect_to_window", true); // Original, Photon +defaultPref("userChrome.tab.color_like_toolbar", true); // Original, Photon -pref("userChrome.tab.lepton_like_padding", true); // Original -pref("userChrome.tab.photon_like_padding", false); // Photon +defaultPref("userChrome.tab.lepton_like_padding", true); // Original +defaultPref("userChrome.tab.photon_like_padding", false); // Photon -pref("userChrome.tab.dynamic_separator", true); // Original, Proton -pref("userChrome.tab.static_separator", false); // Photon -pref("userChrome.tab.static_separator.selected_accent", false); // Just option -pref("userChrome.tab.bar_separator", false); // Just option +defaultPref("userChrome.tab.dynamic_separator", true); // Original, Proton +defaultPref("userChrome.tab.static_separator", false); // Photon +defaultPref("userChrome.tab.static_separator.selected_accent", false); // Just option +defaultPref("userChrome.tab.bar_separator", false); // Just option -pref("userChrome.tab.newtab_button_like_tab", true); // Original -pref("userChrome.tab.newtab_button_smaller", false); // Photon -pref("userChrome.tab.newtab_button_proton", false); // Proton +defaultPref("userChrome.tab.newtab_button_like_tab", true); // Original +defaultPref("userChrome.tab.newtab_button_smaller", false); // Photon +defaultPref("userChrome.tab.newtab_button_proton", false); // Proton -pref("userChrome.icon.panel_full", true); // Original, Proton -pref("userChrome.icon.panel_photon", false); // Photon +defaultPref("userChrome.icon.panel_full", true); // Original, Proton +defaultPref("userChrome.icon.panel_photon", false); // Photon // Original Only -pref("userChrome.tab.box_shadow", true); -pref("userChrome.tab.bottom_rounded_corner", true); +defaultPref("userChrome.tab.box_shadow", true); +defaultPref("userChrome.tab.bottom_rounded_corner", true); // Photon Only -pref("userChrome.tab.photon_like_contextline", false); -pref("userChrome.rounding.square_tab", false); +defaultPref("userChrome.tab.photon_like_contextline", false); +defaultPref("userChrome.rounding.square_tab", false); // Theme fixes -pref("userChrome.compatibility.theme", true); -pref("userChrome.compatibility.os", true); - -pref("userChrome.theme.built_in_contrast", true); -pref("userChrome.theme.system_default", true); -pref("userChrome.theme.proton_color", true); -pref("userChrome.theme.proton_chrome", true); // Need proton_color -pref("userChrome.theme.fully_color", true); // Need proton_color -pref("userChrome.theme.fully_dark", true); // Need proton_color - -pref("userChrome.decoration.cursor", true); -pref("userChrome.decoration.field_border", true); -pref("userChrome.decoration.download_panel", true); - -pref("userChrome.padding.tabbar_width", true); -pref("userChrome.padding.tabbar_height", true); -pref("userChrome.padding.toolbar_button", true); -pref("userChrome.padding.navbar_width", true); -pref("userChrome.padding.urlbar", true); -pref("userChrome.padding.bookmarkbar", true); -pref("userChrome.padding.infobar", true); -pref("userChrome.padding.menu", true); -pref("userChrome.padding.bookmark_menu", true); -pref("userChrome.padding.global_menubar", true); -pref("userChrome.padding.panel", true); -pref("userChrome.padding.popup_panel", true); - -pref("userChrome.tab.multi_selected", true); -pref("userChrome.tab.unloaded", true); -pref("userChrome.tab.letters_cleary", true); -pref("userChrome.tab.close_button_at_hover", true); -pref("userChrome.tab.sound_hide_label", true); -pref("userChrome.tab.sound_with_favicons", true); -pref("userChrome.tab.container", true); -pref("userChrome.tab.crashed", true); - -pref("userChrome.fullscreen.overlap", true); -pref("userChrome.fullscreen.show_bookmarkbar", true); - -pref("userChrome.icon.library", true); -pref("userChrome.icon.panel", true); -pref("userChrome.icon.menu", true); -pref("userChrome.icon.context_menu", true); -pref("userChrome.icon.global_menu", true); -pref("userChrome.icon.global_menubar", true); -pref("userChrome.icon.1-25px_stroke", true); +defaultPref("userChrome.compatibility.theme", true); +defaultPref("userChrome.compatibility.os", true); + +defaultPref("userChrome.theme.built_in_contrast", true); +defaultPref("userChrome.theme.system_default", true); +defaultPref("userChrome.theme.proton_color", true); +defaultPref("userChrome.theme.proton_chrome", true); // Need proton_color +defaultPref("userChrome.theme.fully_color", true); // Need proton_color +defaultPref("userChrome.theme.fully_dark", true); // Need proton_color + +defaultPref("userChrome.decoration.cursor", true); +defaultPref("userChrome.decoration.field_border", true); +defaultPref("userChrome.decoration.download_panel", true); + +defaultPref("userChrome.padding.tabbar_width", true); +defaultPref("userChrome.padding.tabbar_height", true); +defaultPref("userChrome.padding.toolbar_button", true); +defaultPref("userChrome.padding.navbar_width", true); +defaultPref("userChrome.padding.urlbar", true); +defaultPref("userChrome.padding.bookmarkbar", true); +defaultPref("userChrome.padding.infobar", true); +defaultPref("userChrome.padding.menu", true); +defaultPref("userChrome.padding.bookmark_menu", true); +defaultPref("userChrome.padding.global_menubar", true); +defaultPref("userChrome.padding.panel", true); +defaultPref("userChrome.padding.popup_panel", true); + +defaultPref("userChrome.tab.multi_selected", true); +defaultPref("userChrome.tab.unloaded", true); +defaultPref("userChrome.tab.letters_cleary", true); +defaultPref("userChrome.tab.close_button_at_hover", true); +defaultPref("userChrome.tab.sound_hide_label", true); +defaultPref("userChrome.tab.sound_with_favicons", true); +defaultPref("userChrome.tab.container", true); +defaultPref("userChrome.tab.crashed", true); + +defaultPref("userChrome.fullscreen.overlap", true); +defaultPref("userChrome.fullscreen.show_bookmarkbar", true); + +defaultPref("userChrome.icon.library", true); +defaultPref("userChrome.icon.panel", true); +defaultPref("userChrome.icon.menu", true); +defaultPref("userChrome.icon.context_menu", true); +defaultPref("userChrome.icon.global_menu", true); +defaultPref("userChrome.icon.global_menubar", true); +defaultPref("userChrome.icon.1-25px_stroke", true); // ================================================================= // THESE ARE THE PROPERTIES THAT MUST BE ENABLED FOR JUGGLER TO WORK // ================================================================= -pref("dom.input_events.security.minNumTicks", 0); -pref("dom.input_events.security.minTimeElapsedInMS", 0); +defaultPref("dom.input_events.security.minNumTicks", 0); +defaultPref("dom.input_events.security.minTimeElapsedInMS", 0); -pref("dom.iframe_lazy_loading.enabled", false); +defaultPref("dom.iframe_lazy_loading.enabled", false); -pref("datareporting.policy.dataSubmissionEnabled", false); -pref("datareporting.policy.dataSubmissionPolicyAccepted", false); -pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true); +defaultPref("datareporting.policy.dataSubmissionEnabled", false); +defaultPref("datareporting.policy.dataSubmissionPolicyAccepted", false); +defaultPref("datareporting.policy.dataSubmissionPolicyBypassNotification", true); // This preference breaks our authentication flow. -pref("network.auth.use_redirect_for_retries", false); +defaultPref("network.auth.use_redirect_for_retries", false); // Disable cross-process iframes, but not cross-process navigations. -// pref("fission.webContentIsolationStrategy", 0); +// defaultPref("fission.webContentIsolationStrategy", 0); // Disable BFCache in parent process. // We also separately disable BFCache in content via docSchell property. -pref("fission.bfcacheInParent", false); +defaultPref("fission.bfcacheInParent", false); // Disable first-party-based cookie partitioning. // When it is enabled, we have to retain "thirdPartyCookie^" permissions // in the storageState. -pref("network.cookie.cookieBehavior", 4); +defaultPref("network.cookie.cookieBehavior", 4); // Increase max number of child web processes so that new pages // get a new process by default and we have a process isolation // between pages from different contexts. If this becomes a performance // issue we can povide custom '@mozilla.org/ipc/processselector;1' -pref("dom.ipc.processCount", 60000); +// defaultPref("dom.ipc.processCount", 60000); + +// Dear Playwright devs, +// YES! This does cause a significant performance hit! +// Camoufox will be keeping this at 1 for the foreseeable future. +defaultPref("dom.ipc.processCount", 1); // Never reuse processes as they may keep previously overridden values // (locale, timezone etc.). -pref("dom.ipc.processPrelaunch.enabled", false); +defaultPref("dom.ipc.processPrelaunch.enabled", false); // Isolate permissions by user context. -pref("permissions.isolateBy.userContext", true); +defaultPref("permissions.isolateBy.userContext", true); // Allow creating files in content process - required for // |Page.setFileInputFiles| protocol method. -pref("dom.file.createInChild", true); +defaultPref("dom.file.createInChild", true); // Do not warn when closing all open tabs -pref("browser.tabs.warnOnClose", false); +defaultPref("browser.tabs.warnOnClose", false); // Do not warn when closing all other open tabs -pref("browser.tabs.warnOnCloseOtherTabs", false); +defaultPref("browser.tabs.warnOnCloseOtherTabs", false); // Do not warn when multiple tabs will be opened -pref("browser.tabs.warnOnOpen", false); +defaultPref("browser.tabs.warnOnOpen", false); // Do not warn on quitting Firefox -pref("browser.warnOnQuit", false); +defaultPref("browser.warnOnQuit", false); // Disable popup-blocker -pref("dom.disable_open_during_load", false); +defaultPref("dom.disable_open_during_load", false); // Disable the ProcessHangMonitor -pref("dom.ipc.reportProcessHangs", false); -pref("hangmonitor.timeout", 0); +defaultPref("dom.ipc.reportProcessHangs", false); +defaultPref("hangmonitor.timeout", 0); // Allow the application to have focus even it runs in the background -pref("focusmanager.testmode", true); +defaultPref("focusmanager.testmode", true); // No ICC color correction. We need this for reproducible screenshots. // See https://developer.mozilla.org/en/docs/Mozilla/Firefox/Releases/3.5/ICC_color_correction_in_Firefox. -pref("gfx.color_management.mode", 0); -pref("gfx.color_management.rendering_intent", 3); +defaultPref("gfx.color_management.mode", 0); +defaultPref("gfx.color_management.rendering_intent", 3); // Always use network provider for geolocation tests so we bypass the // macOS dialog raised by the corelocation provider -pref("geo.provider.testing", true); +defaultPref("geo.provider.testing", true); // From TOR -// pref("dom.webaudio.enabled", false); // Bug 13017: Disable Web Audio API -// pref("dom.webmidi.enabled", false); // Bug 41398: Disable Web MIDI API +// defaultPref("dom.webaudio.enabled", false); // Bug 13017: Disable Web Audio API +// defaultPref("dom.webmidi.enabled", false); // Bug 41398: Disable Web MIDI API // tor-browser#42043: Stop reporting device IDs (and spoof their number without // RFP, RFP already reports 1 audioinput and 1 videoinput, but still has // randomized IDs when this pref is true). // Defense-in-depth (already the default value) from Firefox 119 or 120. -pref("media.devices.enumerate.legacy.enabled", false); +defaultPref("media.devices.enumerate.legacy.enabled", false); // ================================================================= @@ -529,80 +544,80 @@ pref("media.devices.enumerate.legacy.enabled", false); // ================================================================= // Enable software-backed webgl. See https://phabricator.services.mozilla.com/D164016 -pref("webgl.forbid-software", false); +defaultPref("webgl.forbid-software", false); // Disable auto-fill for credit cards and addresses. // See https://github.com/microsoft/playwright/issues/21393 -pref("extensions.formautofill.creditCards.supported", "off"); -pref("extensions.formautofill.addresses.supported", "off"); +defaultPref("extensions.formautofill.creditCards.supported", "off"); +defaultPref("extensions.formautofill.addresses.supported", "off"); // Allow access to system-added self-signed certificates. This aligns // firefox behavior with other browser defaults. -pref("security.enterprise_roots.enabled", true); +defaultPref("security.enterprise_roots.enabled", true); // Avoid stalling on shutdown, after "xpcom-will-shutdown" phase. // This at least happens when shutting down soon after launching. // See AppShutdown.cpp for more details on shutdown phases. -pref("toolkit.shutdown.fastShutdownStage", 3); +defaultPref("toolkit.shutdown.fastShutdownStage", 3); // Only allow the old modal dialogs. This should be removed when there is // support for the new modal UI (see Bug 1686743). -pref("prompts.contentPromptSubDialog", false); +defaultPref("prompts.contentPromptSubDialog", false); // Do not use system colors - they are affected by themes. -pref("ui.use_standins_for_native_colors", true); +defaultPref("ui.use_standins_for_native_colors", true); // Turn off the Push service. -pref("dom.push.serverURL", ""); +defaultPref("dom.push.serverURL", ""); // Prevent Remote Settings (firefox.settings.services.mozilla.com) to issue non local connections. -pref("services.settings.server", ""); +defaultPref("services.settings.server", ""); // Prevent location.services.mozilla.com to issue non local connections. -pref("browser.region.network.url", ""); -pref("browser.pocket.enabled", false); -pref("browser.newtabpage.activity-stream.feeds.topsites", false); +defaultPref("browser.region.network.url", ""); +defaultPref("browser.pocket.enabled", false); +defaultPref("browser.newtabpage.activity-stream.feeds.topsites", false); // Disable sponsored tiles from "Mozilla Tiles Service" -pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); +defaultPref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); // required to prevent non-local access to push.services.mozilla.com -pref("dom.push.connection.enabled", false); +defaultPref("dom.push.connection.enabled", false); // Prevent contile.services.mozilla.com to issue non local connections. -pref("browser.topsites.contile.enabled", false); -pref("browser.safebrowsing.provider.mozilla.updateURL", ""); -pref("browser.library.activity-stream.enabled", false); -pref("browser.search.geoSpecificDefaults", false); -pref("browser.search.geoSpecificDefaults.url", ""); -pref("captivedetect.canonicalURL", ""); -pref("network.captive-portal-service.enabled", false); -pref("network.connectivity-service.enabled", false); -pref("browser.newtabpage.activity-stream.asrouter.providers.snippets", ""); +defaultPref("browser.topsites.contile.enabled", false); +defaultPref("browser.safebrowsing.provider.mozilla.updateURL", ""); +defaultPref("browser.library.activity-stream.enabled", false); +defaultPref("browser.search.geoSpecificDefaults", false); +defaultPref("browser.search.geoSpecificDefaults.url", ""); +defaultPref("captivedetect.canonicalURL", ""); +defaultPref("network.captive-portal-service.enabled", false); +defaultPref("network.connectivity-service.enabled", false); +defaultPref("browser.newtabpage.activity-stream.asrouter.providers.snippets", ""); // Make sure Shield doesnt hit the network. -pref("app.normandy.api_url", ""); -pref("app.normandy.enabled", false); +defaultPref("app.normandy.api_url", ""); +defaultPref("app.normandy.enabled", false); // Disable updater -pref("app.update.enabled", false); +defaultPref("app.update.enabled", false); // Disable Firefox old build background check -pref("app.update.checkInstallTime", false); +defaultPref("app.update.checkInstallTime", false); // Disable automatically upgrading Firefox -pref("app.update.disabledForTesting", true); +defaultPref("app.update.disabledForTesting", true); // make absolutely sure it is really off -pref("app.update.auto", false); -pref("app.update.mode", 0); -pref("app.update.service.enabled", false); +defaultPref("app.update.auto", false); +defaultPref("app.update.mode", 0); +defaultPref("app.update.service.enabled", false); // Dislabe newtabpage -pref("browser.startup.homepage", "about:blank"); -pref("browser.startup.page", 0); -pref("browser.newtabpage.enabled", false); +defaultPref("browser.startup.homepage", "about:blank"); +defaultPref("browser.startup.page", 0); +defaultPref("browser.newtabpage.enabled", false); // Do not redirect user when a milstone upgrade of Firefox is detected -pref("browser.startup.homepage_override.mstone", "ignore"); +defaultPref("browser.startup.homepage_override.mstone", "ignore"); // Disable topstories -pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); +defaultPref("browser.newtabpage.activity-stream.feeds.section.topstories", false); // DevTools JSONViewer sometimes fails to load dependencies with its require.js. // This spams console with a lot of unpleasant errors. // (bug 1424372) -pref("devtools.jsonview.enabled", false); +defaultPref("devtools.jsonview.enabled", false); // Increase the APZ content response timeout in tests to 1 minute. // This is to accommodate the fact that test environments tends to be @@ -611,157 +626,157 @@ pref("devtools.jsonview.enabled", false); // sometimes being exceeded and causing false-positive test failures. // // (bug 1176798, bug 1177018, bug 1210465) -pref("apz.content_response_timeout", 60000); +defaultPref("apz.content_response_timeout", 60000); // Indicate that the download panel has been shown once so that // whichever download test runs first doesnt show the popup // inconsistently. -pref("browser.download.panel.shown", true); +defaultPref("browser.download.panel.shown", true); // Background thumbnails in particular cause grief, and disabling // thumbnails in general cannot hurt -pref("browser.pagethumbnails.capturing_disabled", true); +defaultPref("browser.pagethumbnails.capturing_disabled", true); // Disable safebrowsing components. -pref("browser.safebrowsing.blockedURIs.enabled", false); -pref("browser.safebrowsing.downloads.enabled", false); -pref("browser.safebrowsing.passwords.enabled", false); -pref("browser.safebrowsing.malware.enabled", false); -pref("browser.safebrowsing.phishing.enabled", false); +defaultPref("browser.safebrowsing.blockedURIs.enabled", false); +defaultPref("browser.safebrowsing.downloads.enabled", false); +defaultPref("browser.safebrowsing.passwords.enabled", false); +defaultPref("browser.safebrowsing.malware.enabled", false); +defaultPref("browser.safebrowsing.phishing.enabled", false); // Disable updates to search engines. -pref("browser.search.update", false); +defaultPref("browser.search.update", false); // Do not restore the last open set of tabs if the browser has crashed -pref("browser.sessionstore.resume_from_crash", false); +defaultPref("browser.sessionstore.resume_from_crash", false); // Dont check for the default web browser during startup. -pref("browser.shell.checkDefaultBrowser", false); +defaultPref("browser.shell.checkDefaultBrowser", false); // Disable browser animations (tabs, fullscreen, sliding alerts) -pref("toolkit.cosmeticAnimations.enabled", false); +defaultPref("toolkit.cosmeticAnimations.enabled", false); // Close the window when the last tab gets closed -pref("browser.tabs.closeWindowWithLastTab", true); +defaultPref("browser.tabs.closeWindowWithLastTab", true); // Do not allow background tabs to be zombified on Android, otherwise for // tests that open additional tabs, the test harness tab itself might get // unloaded -pref("browser.tabs.disableBackgroundZombification", false); +defaultPref("browser.tabs.disableBackgroundZombification", false); // Disable first run splash page on Windows 10 -pref("browser.usedOnWindows10.introURL", ""); +defaultPref("browser.usedOnWindows10.introURL", ""); // Disable the UI tour. // // Should be set in profile. -pref("browser.uitour.enabled", false); +defaultPref("browser.uitour.enabled", false); // Turn off search suggestions in the location bar so as not to trigger // network connections. -pref("browser.urlbar.suggest.searches", false); +defaultPref("browser.urlbar.suggest.searches", false); // Do not show datareporting policy notifications which can // interfere with tests -pref("datareporting.healthreport.documentServerURI", ""); -pref("datareporting.healthreport.about.reportUrl", ""); -pref("datareporting.healthreport.logging.consoleEnabled", false); -pref("datareporting.healthreport.service.enabled", false); -pref("datareporting.healthreport.service.firstRun", false); -pref("datareporting.healthreport.uploadEnabled", false); +defaultPref("datareporting.healthreport.documentServerURI", ""); +defaultPref("datareporting.healthreport.about.reportUrl", ""); +defaultPref("datareporting.healthreport.logging.consoleEnabled", false); +defaultPref("datareporting.healthreport.service.enabled", false); +defaultPref("datareporting.healthreport.service.firstRun", false); +defaultPref("datareporting.healthreport.uploadEnabled", false); // Automatically unload beforeunload alerts -pref("dom.disable_beforeunload", false); +defaultPref("dom.disable_beforeunload", false); // Disable slow script dialogues -pref("dom.max_chrome_script_run_time", 0); -pref("dom.max_script_run_time", 0); +defaultPref("dom.max_chrome_script_run_time", 0); +defaultPref("dom.max_script_run_time", 0); // Only load extensions from the application and user profile // AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION -pref("extensions.autoDisableScopes", 0); -pref("extensions.enabledScopes", 5); +defaultPref("extensions.autoDisableScopes", 0); +defaultPref("extensions.enabledScopes", 5); // Disable metadata caching for installed add-ons by default -pref("extensions.getAddons.cache.enabled", false); +defaultPref("extensions.getAddons.cache.enabled", false); // Disable installing any distribution extensions or add-ons. -pref("extensions.installDistroAddons", false); +defaultPref("extensions.installDistroAddons", false); // Turn off extension updates so they do not bother tests -pref("extensions.update.enabled", false); -pref("extensions.update.notifyUser", false); +defaultPref("extensions.update.enabled", false); +defaultPref("extensions.update.notifyUser", false); // Make sure opening about:addons will not hit the network -pref("extensions.webservice.discoverURL", ""); +defaultPref("extensions.webservice.discoverURL", ""); -pref("extensions.screenshots.disabled", true); -pref("extensions.screenshots.upload-disabled", true); +defaultPref("extensions.screenshots.disabled", true); +defaultPref("extensions.screenshots.upload-disabled", true); // Disable useragent updates -pref("general.useragent.updates.enabled", false); +defaultPref("general.useragent.updates.enabled", false); // Do not scan Wifi -pref("geo.wifi.scan", false); +defaultPref("geo.wifi.scan", false); // Show chrome errors and warnings in the error console -pref("javascript.options.showInConsole", true); +defaultPref("javascript.options.showInConsole", true); // Disable download and usage of OpenH264: and Widevine plugins -pref("media.gmp-manager.updateEnabled", false); +defaultPref("media.gmp-manager.updateEnabled", false); // Do not prompt with long usernames or passwords in URLs -pref("network.http.phishy-userpass-length", 255); +defaultPref("network.http.phishy-userpass-length", 255); // Do not prompt for temporary redirects -pref("network.http.prompt-temp-redirect", false); +defaultPref("network.http.prompt-temp-redirect", false); // Disable speculative connections so they are not reported as leaking // when they are hanging around -pref("network.http.speculative-parallel-limit", 0); +defaultPref("network.http.speculative-parallel-limit", 0); // Do not automatically switch between offline and online -pref("network.manage-offline-status", false); +defaultPref("network.manage-offline-status", false); // Make sure SNTP requests do not hit the network -pref("network.sntp.pools", ""); +defaultPref("network.sntp.pools", ""); // Disable Flash -pref("plugin.state.flash", 0); +defaultPref("plugin.state.flash", 0); -pref("privacy.trackingprotection.enabled", false); +defaultPref("privacy.trackingprotection.enabled", false); -pref("security.certerrors.mitm.priming.enabled", false); +defaultPref("security.certerrors.mitm.priming.enabled", false); // Local documents have access to all other local documents, // including directory listings -pref("security.fileuri.strict_origin_policy", false); +defaultPref("security.fileuri.strict_origin_policy", false); // Tests do not wait for the notification button security delay -pref("security.notification_enable_delay", 0); +defaultPref("security.notification_enable_delay", 0); // Do not automatically fill sign-in forms with known usernames and // passwords -pref("signon.autofillForms", false); +defaultPref("signon.autofillForms", false); // Disable password capture, so that tests that include forms are not // influenced by the presence of the persistent doorhanger notification -pref("signon.rememberSignons", false); +defaultPref("signon.rememberSignons", false); // Disable first-run welcome page -pref("startup.homepage_welcome_url", "about:blank"); -pref("startup.homepage_welcome_url.additional", ""); +defaultPref("startup.homepage_welcome_url", "about:blank"); +defaultPref("startup.homepage_welcome_url.additional", ""); // Prevent starting into safe mode after application crashes -pref("toolkit.startup.max_resumed_crashes", -1); -pref("toolkit.crashreporter.enabled", false); +defaultPref("toolkit.startup.max_resumed_crashes", -1); +defaultPref("toolkit.crashreporter.enabled", false); -pref("toolkit.telemetry.enabled", false); -pref("toolkit.telemetry.server", ""); +defaultPref("toolkit.telemetry.enabled", false); +defaultPref("toolkit.telemetry.server", ""); // Disable downloading the list of blocked extensions. -pref("extensions.blocklist.enabled", false); +defaultPref("extensions.blocklist.enabled", false); // Force Firefox Devtools to open in a separate window. -pref("devtools.toolbox.host", "window"); +defaultPref("devtools.toolbox.host", "window"); // Disable auto translations -pref("browser.translations.enable", false); +defaultPref("browser.translations.enable", false); // Disable spell check -pref("layout.spellcheckDefault", 0); +defaultPref("layout.spellcheckDefault", 0); diff --git a/settings/distribution/policies.json b/settings/distribution/policies.json index d076824..292ef42 100644 --- a/settings/distribution/policies.json +++ b/settings/distribution/policies.json @@ -14,7 +14,6 @@ "DisableSetDesktopBackground": true, "DisableDeveloperTools": false, "NoDefaultBookmarks": true, - "SanitizeOnShutdown": true, "DisableFirefoxScreenshots": true, "DisableSafeMode": true, "DisplayBookmarksToolbar": "never", diff --git a/settings/properties.json b/settings/properties.json index a6e6cf1..61e59da 100644 --- a/settings/properties.json +++ b/settings/properties.json @@ -82,5 +82,6 @@ { "property": "webGl2:shaderPrecisionFormats:blockIfNotDefined", "type": "bool" }, { "property": "webGl:contextAttributes", "type": "dict" }, { "property": "webGl2:contextAttributes", "type": "dict" }, + { "property": "memorysaver", "type": "bool" }, { "property": "debug", "type": "bool" } ] \ No newline at end of file diff --git a/upstream.sh b/upstream.sh index 5a232db..b6e73c9 100644 --- a/upstream.sh +++ b/upstream.sh @@ -1,2 +1,2 @@ version=130.0.1 -release=beta.12 +release=beta.13