Skip to content
Snippets Groups Projects
firefox.js 146 KiB
Newer Older
#filter dumbComments emptyLines substitution

// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Non-static prefs that are specific to desktop Firefox belong in this file
// (unless there is a compelling and documented reason for them to belong in
// another file).
//
// Please indent all prefs defined within #ifdef/#ifndef conditions. This
// improves readability, particular for conditional blocks that exceed a single
// screen.
  #ifndef XP_MACOSX
    #define UNIX_BUT_NOT_MAC
  #endif
pref("browser.hiddenWindowChromeURL", "chrome://browser/content/hiddenWindowMac.xhtml");
// Set add-ons abuse report related prefs specific to Firefox Desktop.
pref("extensions.abuseReport.enabled", true);

// Enables some extra Extension System Logging (can reduce performance)
pref("extensions.logging.enabled", false);
// Disables strict compatibility, making addons compatible-by-default.
pref("extensions.strictCompatibility", false);
pref("extensions.webextOptionalPermissionPrompts", true);
// If enabled, install origin permission verification happens after addons are downloaded.
pref("extensions.postDownloadThirdPartyPrompt", true);
pref("extensions.getAddons.cache.enabled", true);
pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v4/addons/search/?guid=%IDS%&lang=%LOCALE%");
pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%");
pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/");
pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%");
pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%");
pref("extensions.getAddons.browserMappings.url", "https://services.addons.mozilla.org/api/v5/addons/browser-mappings/?browser=%BROWSER%");
// The URL for the privacy policy related to recommended extensions.
pref("extensions.recommendations.privacyPolicyUrl", "https://www.mozilla.org/privacy/firefox/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_content=privacy-policy-link#addons");
// The URL for Firefox Color, recommended on the theme page in about:addons.
pref("extensions.recommendations.themeRecommendationUrl", "https://color.firefox.com/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_content=theme-footer-link");

// No AUS check for system add-on updates for Tor Browser users.
pref("extensions.systemAddon.update.url", "");
pref("extensions.systemAddon.update.enabled", false);
// Disable add-ons that are not installed by the user in all scopes by default.
// See the SCOPE constants in AddonManager.sys.mjs for values to use here.
pref("extensions.autoDisableScopes", 15);
// Scopes to scan for changes at startup.
pref("extensions.startupScanScopes", 0);
pref("extensions.geckoProfiler.acceptedExtensionIds", "geckoprofiler@mozilla.com,quantum-foxfooding@mozilla.com,raptor@mozilla.org");
pref("extensions.webextensions.remote", true);
// Require signed add-ons by default
pref("extensions.langpacks.signatures.required", true);
pref("xpinstall.signatures.required", true);
pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/language-tools/");
// At startup, should we check to see if the installation
// date is older than some threshold
pref("app.update.checkInstallTime", true);

// The number of days a binary is permitted to be old without checking is defined in
// firefox-branding.js (app.update.checkInstallTime.days)

// The minimum delay in seconds for the timer to fire between the notification
// of each consumer of the timer manager.
// minimum=30 seconds, default=120 seconds, and maximum=300 seconds
pref("app.update.timerMinimumDelay", 120);
// The minimum delay in milliseconds for the first firing after startup of the timer
// to notify consumers of the timer manager.
// minimum=10 seconds, default=30 seconds, and maximum=120 seconds
pref("app.update.timerFirstInterval", 30000);

// App-specific update preferences
// The interval to check for updates (app.update.interval) is defined in
// firefox-branding.js

// Enables some extra Application Update Logging (can reduce performance)
pref("app.update.log", false);
// Causes Application Update Logging to be sent to a file in the profile
// directory. This preference is automatically disabled on application start to
// prevent it from being left on accidentally. Turning this pref on enables
// logging, even if app.update.log is false.
pref("app.update.log.file", false);
// The number of general background check failures to allow before notifying the
// user of the failure. User initiated update checks always notify the user of
// the failure.
pref("app.update.backgroundMaxErrors", 10);

// How many times we should let downloads fail before prompting the user to
// download a fresh installer.
pref("app.update.download.maxAttempts", 2);

// How many times we should let an elevation prompt fail before prompting the user to
// download a fresh installer.
pref("app.update.elevate.maxAttempts", 2);
#ifdef NIGHTLY_BUILD
  // Whether to delay popup notifications when an update is available and
  // suppress them when an update is installed and waiting for user to restart.
  // If set to true, these notifications will immediately be shown as banners in
  // the app menu and as badges on the app menu button. Update available
  // notifications will not create popup prompts until a week has passed without
  // the user installing the update. Update restart notifications will not
  // create popup prompts at all. This doesn't affect update notifications
  // triggered by errors/failures or manual install prompts.
  pref("app.update.suppressPrompts", false);
#endif

// If set to true, a message will be displayed in the hamburger menu while
// an update is being downloaded.
pref("app.update.notifyDuringDownload", false);

// If set to true, the Update Service will automatically download updates if the
// user can apply updates. This pref is no longer used on Windows, except as the
// default value to migrate to the new location that this data is now stored
// (which is in a file in the update directory). Because of this, this pref
// should no longer be used directly. Instead, getAppUpdateAutoEnabled and
// getAppUpdateAutoEnabled from UpdateUtils.sys.mjs should be used.
// If set to true, the Update Service will apply updates in the background
// when it finishes downloading them.
pref("app.update.staging.enabled", true);
// app.update.url.manual is in branding section
// app.update.url.details is in branding section
// app.update.badgeWaitTime is in branding section
// app.update.interval is in branding section
// app.update.promptWaitTime is in branding section
// Whether or not to attempt using the service for updates.
#ifdef MOZ_MAINTENANCE_SERVICE
  // If set to true, the Update Service will attempt to use Windows BITS to
  // download updates and will fallback to downloading internally if that fails.
  pref("app.update.BITS.enabled", true);
#if defined(MOZ_UPDATE_AGENT)
  pref("app.update.background.loglevel", "error");
  pref("app.update.background.timeoutSec", 600);
  // By default, check for updates when the browser is not running every 7 hours.
  pref("app.update.background.interval", 25200);
  // By default, snapshot Firefox Messaging System targeting for use by the
  // background update task every 60 minutes.
  pref("app.update.background.messaging.targeting.snapshot.intervalSec", 3600);
  // For historical reasons, the background update process requires the Mozilla
  // Maintenance Service to be available and enabled via the service registry
  // key.  When this value is `true`, allow the background update process to
  // update unelevated installations (that are writeable, etc).
  //
  // N.b. This feature impacts the `applications: firefox_desktop` Nimbus
  // application ID (and not the `firefox_desktop_background_task` application
  // ID).  However, the pref will be automatically mirrored to the background
  // update task profile. This means that experiments and enrollment impact the
  // Firefox Desktop browsing profile that _schedules_ the background update
  // task, and then the background update task collects telemetry in accordance
  // with the mirrored pref.
  pref("app.update.background.allowUpdatesForUnelevatedInstallations", false);
#ifdef XP_MACOSX
  // If set to true, Firefox will automatically restart if it is left running
  // with no browser windows open.
  pref("app.update.noWindowAutoRestart.enabled", true);
  // How long to wait after all browser windows are closed before restarting,
  // in milliseconds. 5 min = 300000 ms
  pref("app.update.noWindowAutoRestart.delayMs", 300000);
#endif

#if defined(MOZ_BACKGROUNDTASKS)
  // The amount of time, in seconds, before background tasks time out and exit.
  // Tasks can override this default (10 minutes).
  pref("toolkit.backgroundtasks.defaultTimeoutSec", 600);
#endif

// Symmetric (can be overridden by individual extensions) update preferences.
// e.g.
//  extensions.{GUID}.update.enabled
//  extensions.{GUID}.update.url
//  .. etc ..
//
pref("extensions.update.enabled", true);
pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%&currentAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%&currentAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
pref("extensions.update.interval", 86400);  // Check for updates to Extensions and
pref("lightweightThemes.getMoreURL", "https://addons.mozilla.org/%LOCALE%/firefox/themes");

#if defined(MOZ_WIDEVINE_EME)
// UI tour experience.
pref("browser.uitour.enabled", true);
pref("browser.uitour.loglevel", "Error");
pref("browser.uitour.url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tour/");
// How long to show a Hearbeat survey (two hours, in seconds)
pref("browser.uitour.surveyDuration", 7200);
pref("keyword.enabled", true);
// Fixup whitelists, the urlbar won't try to search for these words, but will
// instead consider them valid TLDs. Don't check these directly, use
// Services.uriFixup.isDomainKnown() instead.
pref("browser.fixup.domainwhitelist.localhost", true);
// https://tools.ietf.org/html/rfc2606
pref("browser.fixup.domainsuffixwhitelist.test", true);
pref("browser.fixup.domainsuffixwhitelist.example", true);
pref("browser.fixup.domainsuffixwhitelist.invalid", true);
pref("browser.fixup.domainsuffixwhitelist.localhost", true);
// https://tools.ietf.org/html/draft-wkumari-dnsop-internal-00
pref("browser.fixup.domainsuffixwhitelist.internal", true);
// https://tools.ietf.org/html/rfc6762
pref("browser.fixup.domainsuffixwhitelist.local", true);
// Whether to always go through the DNS server before sending a single word
// search string, that may contain a valid host, to a search engine.
pref("browser.fixup.dns_first_for_single_words", false);

// UI density of the browser chrome. This mostly affects toolbarbutton
// and urlbar spacing. The possible values are 0=normal, 1=compact, 2=touch.
pref("browser.uidensity", 0);
// Whether Firefox will automatically override the uidensity to "touch"
// while the user is in a touch environment (such as Windows tablet mode).
pref("browser.touchmode.auto", true);
// Whether Firefox will show the Compact Mode UIDensity option.
pref("browser.compactmode.show", false);
// At startup, check if we're the default browser and prompt user if not.
pref("browser.shell.checkDefaultBrowser", true);
pref("browser.shell.shortcutFavicons",true);
pref("browser.shell.mostRecentDateSetAsDefault", "");
pref("browser.shell.skipDefaultBrowserCheckOnFirstRun", true);
pref("browser.shell.didSkipDefaultBrowserCheckOnFirstRun", false);
pref("browser.shell.defaultBrowserCheckCount", 0);
#if defined(XP_WIN)
// Attempt to set the default browser on Windows 10 using the UserChoice registry keys,
// before falling back to launching the modern Settings dialog.
pref("browser.shell.setDefaultBrowserUserChoice", true);
// When setting default via UserChoice, temporarily rename an ancestor registry key to
// prevent kernel drivers from locking the UserChoice subkeys.
pref("browser.shell.setDefaultBrowserUserChoice.regRename", true);
// When setting the default browser on Windows 10 using the UserChoice
// registry keys, also try to set Firefox as the default PDF handler.
// When setting Firefox as the default PDF handler (subject to conditions
// above), only set Firefox as the default PDF handler when the existing handler
// is a known browser, and not when existing handler is another PDF handler such
// as Acrobat Reader or Nitro PDF.
pref("browser.shell.setDefaultPDFHandler.onlyReplaceBrowsers", true);
// Whether or not to we are allowed to prompt the user to set Firefox as their
// default PDF handler.
pref("browser.shell.checkDefaultPDF", true);
// Will be set to `true` if the user indicates that they don't want to be asked
// again about Firefox being their default PDF handler any more.
pref("browser.shell.checkDefaultPDF.silencedByUser", false);
// Whether or not the user should be shown the guidance notifications when
// setting Firefox as their default browser.
pref("browser.shell.setDefaultGuidanceNotifications", true);
// 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session
// The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore
pref("browser.startup.page",                1);
pref("browser.startup.homepage.abouthome_cache.enabled", true);
pref("browser.startup.homepage.abouthome_cache.loglevel", "Warn");
// Whether we should skip the homepage when opening the first-run page
pref("browser.startup.firstrunSkipsHomepage", true);
// Whether we should show the session-restore infobar on startup
pref("browser.startup.couldRestoreSession.count", 0);

// Show an about:blank window as early as possible for quick startup feedback.
// Held to nightly on Linux due to bug 1450626.
// Disabled on Mac because the bouncing dock icon already provides feedback.
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) && defined(NIGHTLY_BUILD)
  pref("browser.startup.blankWindow", true);
  pref("browser.startup.blankWindow", false);
// Show a skeleton UI window prior to loading libxul. Only visible for windows
// users as it is not implemented anywhere else.
#if defined(XP_WIN)
pref("browser.startup.preXulSkeletonUI", true);

// Whether the checkbox to enable Windows launch on login is shown
pref("browser.startup.windowsLaunchOnLogin.enabled", true);
// Whether to show the launch on login infobar notification
pref("browser.startup.windowsLaunchOnLogin.disableLaunchOnLoginPrompt", false);
// Show an upgrade dialog on major upgrades.
pref("browser.startup.upgradeDialog.enabled", false);
pref("browser.chrome.site_icons", true);
// browser.warnOnQuit == false will override all other possible prompts when quitting or restarting
pref("browser.warnOnQuit", true);
// Whether to warn when quitting when using the shortcut key.
#if defined(XP_WIN)
  pref("browser.warnOnQuitShortcut", false);
#else
  pref("browser.warnOnQuitShortcut", true);
#endif

// TODO bug 1702563: Renable fullscreen autohide by default on macOS.
#ifdef XP_MACOSX
  pref("browser.fullscreen.autohide", false);
#else
  pref("browser.fullscreen.autohide", true);
#endif

pref("browser.overlink-delay", 80);
pref("browser.theme.colorway-closet", true);
#ifdef NIGHTLY_BUILD
pref("browser.theme.macos.native-theme", true);
#else
pref("browser.theme.macos.native-theme", false);
#endif
// Whether expired built-in colorways themes that are active or retained
// should be allowed to check for updates and be updated to an AMO hosted
// theme with the same id (as part of preparing to remove from mozilla-central
// all the expired built-in colorways themes, after existing users have been
// migrated to colorways themes hosted on AMO).
pref("browser.theme.colorway-migration", true);
// Whether using `ctrl` when hitting return/enter in the URL bar
// (or clicking 'go') should prefix 'www.' and suffix
// browser.fixup.alternate.suffix to the URL bar value prior to
// navigating.
pref("browser.urlbar.ctrlCanonizesURLs", true);

// Whether we announce to screen readers when tab-to-search results are
// inserted.
pref("browser.urlbar.accessibility.tabToSearch.announceResults", true);

// Control autoFill behavior
pref("browser.urlbar.autoFill", true);
// Whether enabling adaptive history autofill.
pref("browser.urlbar.autoFill.adaptiveHistory.enabled", false);

// Minimum char length of the user's search string to enable adaptive history
// autofill.
pref("browser.urlbar.autoFill.adaptiveHistory.minCharsThreshold", 0);

// Whether to warm up network connections for autofill or search results.
pref("browser.urlbar.speculativeConnect.enabled", true);
// Whether bookmarklets should be filtered out of Address Bar matches.
// This is enabled for security reasons, when true it is still possible to
// search for bookmarklets typing "javascript: " followed by the actual query.
pref("browser.urlbar.filter.javascript", true);
// Enable a certain level of urlbar logging to the Browser Console. See
// ConsoleInstance.webidl.
pref("browser.urlbar.loglevel", "Error");

// the maximum number of results to show in autocomplete when doing richResults
pref("browser.urlbar.maxRichResults", 10);
// The maximum number of historical search results to show.
pref("browser.urlbar.maxHistoricalSearchSuggestions", 2);
// The default behavior for the urlbar can be configured to use any combination
// of the match filters with each additional filter adding more results (union).
pref("browser.urlbar.suggest.bookmark",             true);
pref("browser.urlbar.suggest.clipboard",            true);
pref("browser.urlbar.suggest.history",              true);
pref("browser.urlbar.suggest.openpage",             true);
pref("browser.urlbar.suggest.remotetab",            true);
pref("browser.urlbar.suggest.searches",             true);
pref("browser.urlbar.suggest.topsites",             true);
pref("browser.urlbar.suggest.engines",              true);
pref("browser.urlbar.suggest.calculator",           false);
pref("browser.urlbar.suggest.recentsearches",       true);
pref("browser.urlbar.scotchBonnet.enableOverride", false);
// Enable trending suggestions and recent searches.
pref("browser.urlbar.trending.featureGate", true);
pref("browser.urlbar.trending.requireSearchMode", false);
pref("browser.urlbar.recentsearches.featureGate", true);
// Enable Rich Entities.
pref("browser.urlbar.richSuggestions.featureGate", true);
pref("browser.search.param.search_rich_suggestions", "fen");
// Feature gate pref for weather suggestions in the urlbar.
pref("browser.urlbar.weather.featureGate", false);

// Enable clipboard suggestions feature, the pref should be removed once stable.
pref("browser.urlbar.clipboard.featureGate", false);
// When false, the weather suggestion will not be fetched when a VPN is
// detected. When true, it will be fetched anyway.
pref("browser.urlbar.weather.ignoreVPN", false);

// The minimum prefix length of a weather keyword the user must type to trigger
// the suggestion. 0 means the min length should be taken from Nimbus or remote
// settings.
pref("browser.urlbar.weather.minKeywordLength", 0);

// If `browser.urlbar.weather.featureGate` is true, this controls whether
// weather suggestions are turned on.
pref("browser.urlbar.suggest.weather", true);

// If `browser.urlbar.trending.featureGate` is true, this controls whether
// trending suggestions are turned on.
pref("browser.urlbar.suggest.trending", true);

// Whether non-sponsored quick suggest results are shown in the urlbar. This
// pref is exposed to the user in the UI, and it's sticky so that its
// user-branch value persists regardless of whatever Firefox Suggest scenarios,
// with their various default-branch values, the user is enrolled in over time.
pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false, sticky);

// Whether sponsored quick suggest results are shown in the urlbar. This pref is
// exposed to the user in the UI, and it's sticky so that its user-branch value
// persists regardless of whatever Firefox Suggest scenarios, with their various
// default-branch values, the user is enrolled in over time.
pref("browser.urlbar.suggest.quicksuggest.sponsored", false, sticky);

// Whether data collection is enabled for quick suggest results in the urlbar.
// This pref is exposed to the user in the UI, and it's sticky so that its
// user-branch value persists regardless of whatever Firefox Suggest scenarios,
// with their various default-branch values, the user is enrolled in over time.
pref("browser.urlbar.quicksuggest.dataCollection.enabled", false, sticky);

// Whether the Firefox Suggest contextual opt-in result is enabled. If true,
// this implicitly disables shouldShowOnboardingDialog.
pref("browser.urlbar.quicksuggest.contextualOptIn", false);

// Controls which variant of the copy is used for the Firefox Suggest
// contextual opt-in result.
pref("browser.urlbar.quicksuggest.contextualOptIn.sayHello", false);

// Controls whether the Firefox Suggest contextual opt-in result appears at
// the top of results or at the bottom, after one-off buttons.
pref("browser.urlbar.quicksuggest.contextualOptIn.topPosition", true);

// Whether the quick suggest feature in the urlbar is enabled.
pref("browser.urlbar.quicksuggest.enabled", false);
// Whether Firefox Suggest will use the new Rust backend instead of the original
// JS backend.
pref("browser.urlbar.quicksuggest.rustEnabled", true);
// Whether to show the QuickSuggest onboarding dialog.
pref("browser.urlbar.quicksuggest.shouldShowOnboardingDialog", true);

// Show QuickSuggest onboarding dialog on the nth browser restarts.
pref("browser.urlbar.quicksuggest.showOnboardingDialogAfterNRestarts", 0);
// The indexes of the sponsored and non-sponsored quick suggest results within
// the general results group.
pref("browser.urlbar.quicksuggest.sponsoredIndex", -1);
pref("browser.urlbar.quicksuggest.nonSponsoredIndex", -1);

// Whether quick suggest results can be shown in position specified in the
// suggestions.
pref("browser.urlbar.quicksuggest.allowPositionInSuggestions", true);

// Whether non-sponsored quick suggest results are subject to impression
// frequency caps.
pref("browser.urlbar.quicksuggest.impressionCaps.nonSponsoredEnabled", false);

// Whether sponsored quick suggest results are subject to impression frequency
// caps.
pref("browser.urlbar.quicksuggest.impressionCaps.sponsoredEnabled", false);

// Whether unit conversion is enabled.
#ifdef NIGHTLY_BUILD
pref("browser.urlbar.unitConversion.enabled", true);
#else
pref("browser.urlbar.unitConversion.enabled", false);
#endif

// Whether to show search suggestions before general results like history and
// bookmarks.
pref("browser.urlbar.showSearchSuggestionsFirst", true);

// As a user privacy measure, don't fetch search suggestions if a pasted string
// is longer than this.
pref("browser.urlbar.maxCharsForSearchSuggestions", 100);
#ifdef NIGHTLY_BUILD
pref("browser.urlbar.trimHttps", true);
pref("browser.urlbar.untrimOnUserInteraction.featureGate", true);
pref("browser.urlbar.trimHttps", false);
pref("browser.urlbar.untrimOnUserInteraction.featureGate", false);
// If changed to true, copying the entire URL from the location bar will put the
// human readable (percent-decoded) URL on the clipboard.
pref("browser.urlbar.decodeURLsOnCopy", false);

// Whether or not to move tabs into the active window when using the "Switch to
// Tab" feature of the awesomebar.
pref("browser.urlbar.switchTabs.adoptIntoActiveWindow", false);

// Controls whether searching for open tabs returns tabs from any container
// or only from the current container.
pref("browser.urlbar.switchTabs.searchAllContainers", true);
// Whether addresses and search results typed into the address bar
// should be opened in new tabs by default.
pref("browser.urlbar.openintab", false);

// Allow the result menu button to be reached with the Tab key.
pref("browser.urlbar.resultMenu.keyboardAccessible", true);
// If true, we show tail suggestions when available.
pref("browser.urlbar.richSuggestions.tail", true);
// If true, top sites may include sponsored ones.
pref("browser.urlbar.sponsoredTopSites", false);

// Global toggle for whether the show search terms feature
// can be used at all, and enabled/disabled by the user.
#if defined(EARLY_BETA_OR_EARLIER)
pref("browser.urlbar.showSearchTerms.featureGate", true);
#else
pref("browser.urlbar.showSearchTerms.featureGate", false);

// If true, show the search term in the Urlbar while on
// a default search engine results page.
pref("browser.urlbar.showSearchTerms.enabled", true);
// Whether the urlbar displays one-offs to filter searches to history,
// bookmarks, or tabs.
pref("browser.urlbar.shortcuts.bookmarks", true);
pref("browser.urlbar.shortcuts.tabs", true);
pref("browser.urlbar.shortcuts.history", true);
// When we send events to Urlbar extensions, we wait this amount of time in
// milliseconds for them to respond before timing out.
pref("browser.urlbar.extension.timeout", 400);

// Controls when to DNS resolve single word search strings, after they were
// searched for. If the string is resolved as a valid host, show a
// "Did you mean to go to 'host'" prompt.
// 0 - never resolve; 1 - use heuristics (default); 2 - always resolve
pref("browser.urlbar.dnsResolveSingleWordsAfterSearch", 0);
// Whether the results panel should be kept open during IME composition.
// The default value is false because some IME open a picker panel, and we end
// up with two panels on top of each other. Since for now we can't detect that
// we leave this choice to the user, hopefully in the future this can be flipped
// for everyone.
pref("browser.urlbar.keepPanelOpenDuringImeComposition", false);
// Whether Firefox Suggest group labels are shown in the urlbar view.
pref("browser.urlbar.groupLabels.enabled", true);
// The Merino endpoint URL, not including parameters.
pref("browser.urlbar.merino.endpointURL", "https://merino.services.mozilla.com/api/v1/suggest");

// Timeout for Merino fetches (ms).
pref("browser.urlbar.merino.timeoutMs", 200);

// Comma-separated list of providers to request from Merino
pref("browser.urlbar.merino.providers", "");

// Comma-separated list of client variants to send to Merino
pref("browser.urlbar.merino.clientVariants", "");

// Enable site specific search result.
pref("browser.urlbar.contextualSearch.enabled", true);
// Feature gate pref for addon suggestions in the urlbar.
pref("browser.urlbar.addons.featureGate", true);
// If `browser.urlbar.addons.featureGate` is true, this controls whether
// addons suggestions are turned on.
pref("browser.urlbar.suggest.addons", true);

// If `browser.urlbar.mdn.featureGate` is true, this controls whether
// mdn suggestions are turned on.
pref("browser.urlbar.suggest.mdn", true);

// Feature gate pref for Yelp suggestions in the urlbar.
pref("browser.urlbar.yelp.featureGate", false);

// The minimum prefix length of a Yelp keyword the user must type to trigger the
// suggestion. 0 means the min length should be taken from Nimbus.
pref("browser.urlbar.yelp.minKeywordLength", 0);
// Whether Yelp suggestions should be shown as top picks.
pref("browser.urlbar.yelp.priority", false);

// The group-relative suggestedIndex of Yelp suggestions within the Firefox
// Suggest section. Ignored when Yelp suggestions are shown as top picks.
pref("browser.urlbar.yelp.suggestedIndex", 0);

// If `browser.urlbar.yelp.featureGate` is true, this controls whether
// Yelp suggestions are turned on.
pref("browser.urlbar.suggest.yelp", true);

// The minimum prefix length of addons keyword the user must type to trigger
// the suggestion. 0 means the min length should be taken from Nimbus.
pref("browser.urlbar.addons.minKeywordLength", 0);

// Feature gate pref for Pocket suggestions in the urlbar.
pref("browser.urlbar.pocket.featureGate", false);

// If `browser.urlbar.pocket.featureGate` is true, this controls whether Pocket
// suggestions are turned on.
pref("browser.urlbar.suggest.pocket", true);

// Enable logging downloads operations to the Console.
pref("browser.download.loglevel", "Error");
// Number of milliseconds to wait for the http headers (and thus
// the Content-Disposition filename) before giving up and falling back to
// picking a filename without that info in hand so that the user sees some
// feedback from their action.
pref("browser.download.saveLinkAsFilenameTimeout", 4000);
pref("browser.download.useDownloadDir", true);
pref("browser.download.manager.addToRecentDocs", true);
// This records whether or not the panel has been shown at least once.
pref("browser.download.panel.shown", false);

// This records whether or not to show the 'Open in system viewer' context menu item when appropriate
pref("browser.download.openInSystemViewerContextMenuItem", true);

// This records whether or not to show the 'Always open...' context menu item when appropriate
pref("browser.download.alwaysOpenInSystemViewerContextMenuItem", true);

// Open downloaded file types internally for the given types.
// This is a comma-separated list, the empty string ("") means no types are
// viewable internally.
pref("browser.download.viewableInternally.enabledTypes", "xml,svg,webp,avif,jxl");
// This controls whether the button is automatically shown/hidden depending
// on whether there are downloads to show.
pref("browser.download.autohideButton", true);

// Controls whether to open the downloads panel every time a download begins.
// The first download ever run in a new profile will still open the panel.
pref("browser.download.alwaysOpenPanel", true);

// Determines the behavior of the "Delete" item in the downloads context menu.
// Valid values are 0, 1, and 2.
//   0 - Don't remove the download from session list or history.
//   1 - Remove the download from session list, but not history.
//   2 - Remove the download from both session list and history.
pref("browser.download.clearHistoryOnDelete", 0);

  pref("browser.helperApps.deleteTempFileOnExit", true);
// This controls the visibility of the radio button in the
// Unknown Content Type (Helper App) dialog that will open
// the content in the browser for PDF and for other
// Viewable Internally types
// (see browser.download.viewableInternally.enabledTypes)
pref("browser.helperApps.showOpenOptionForPdfJS", true);
pref("browser.helperApps.showOpenOptionForViewableInternally", true);
pref("browser.search.searchEnginesURL",      "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/");
// search bar results always open in a new tab
pref("browser.search.openintab", false);

// context menu searches open in the foreground
pref("browser.search.context.loadInBackground", false);

// Mirrors whether the search-container widget is in the navigation toolbar.
pref("browser.search.widget.inNavBar", false);
// Enables display of the options for the user using a separate default search
// engine in private browsing mode.
pref("browser.search.separatePrivateDefault.ui.enabled", false);
// The maximum amount of times the private default banner is shown.
pref("browser.search.separatePrivateDefault.ui.banner.max", 0);
// Enables search SERP telemetry page categorization.
#ifdef NIGHTLY_BUILD
pref("browser.search.serpEventTelemetryCategorization.enabled", true);
#else
pref("browser.search.serpEventTelemetryCategorization.enabled", false);
// Search Bar removal from the toolbar for users who haven’t used it in 120
// days
pref("browser.search.widget.removeAfterDaysUnused", 120);

// Enable new experimental shopping features. This is solely intended as a
// rollout/"emergency stop" button - it will go away once the feature has
// rolled out. There will be separate controls for user opt-in/opt-out.
pref("browser.shopping.experience2023.enabled", false);

// Ternary int-valued pref indicating if the user has opted into the new
// experimental shopping feature.
// 0 means the user has not opted in or out.
// 1 means the user has opted in.
// 2 means the user has opted out.
pref("browser.shopping.experience2023.optedIn", 0);
// Activates the new experimental shopping sidebar.
// True by default. This is handled by ShoppingUtils.handleAutoActivateOnProduct
// to auto-activate the sidebar for non-opted-in users up to 2 times.
pref("browser.shopping.experience2023.active", true);

// Enables ad exposure telemetry for users opted in to the shopping experience:
// when this pref is true, each time a product is analyzed, we record if an ad
// was available for that product. This value will be toggled via a nimbus
// experiment, so that we can pause collection if the ads server struggles
// under load.
pref("browser.shopping.experience2023.ads.exposure", false);

// Enables the ad / recommended product feature for the shopping sidebar.
// If enabled, users can disable the ad card using the separate pref
// `browser.shopping.experience2023.ads.userEnabled` and visible toggle
pref("browser.shopping.experience2023.ads.enabled", false);
// Activates the ad card in the shopping sidebar.
// Unlike `browser.shopping.experience2023.ads.enabled`, this pref is controlled by users
// using the visible toggle.
pref("browser.shopping.experience2023.ads.userEnabled", true);

// Saves if shopping survey is enabled.
pref("browser.shopping.experience2023.survey.enabled", true);

// Saves if shopping survey is seen.
pref("browser.shopping.experience2023.survey.hasSeen", false);

// Number of PDP visits used to display shopping survey
pref("browser.shopping.experience2023.survey.pdpVisits", 0);
// Enables the auto-open feature for the shopping sidebar,
// including new callouts and settings UI changes
// (this is just the feature flag).
pref("browser.shopping.experience2023.autoOpen.enabled", false);

// Opens the shopping sidebar automatically when viewing a PDP.
pref("browser.shopping.experience2023.autoOpen.userEnabled", true);
// Number of times the sidebar has been closed in a session
pref("browser.shopping.experience2023.sidebarClosedCount", 0);

// When conditions are met, shows a prompt on the shopping sidebar asking users if they want to disable auto-open behavior
pref("browser.shopping.experience2023.showKeepSidebarClosedMessage", true);

// Spin the cursor while the page is loading
pref("browser.spin_cursor_while_busy", false);

// Enable display of megalist option in browser sidebar
// Keep it hidden from about:config for now.
// pref("browser.megalist.enabled", false);

// Enables the display of the Mozilla VPN banner in private browsing windows
pref("browser.privatebrowsing.vpnpromourl", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-%CHANNEL%-browser&utm_campaign=private-browsing-vpn-link");

// Whether the user has opted-in to recommended settings for data features.
pref("browser.dataFeatureRecommendations.enabled", false);
// Use dark theme variant for PBM windows. This is only supported if the theme
// sets darkTheme data.
pref("browser.theme.dark-private-windows", true);
// Pref to control whether or not Private Browsing windows show up
// as separate icons in the Windows taskbar.
pref("browser.privateWindowSeparation.enabled", true);

// Controls visibility of the privacy segmentation preferences section.
pref("browser.privacySegmentation.preferences.show", false);
pref("browser.sessionhistory.max_entries", 50);
// Built-in default permissions.
pref("permissions.manager.defaultsUrl", "resource://app/defaults/permissions");

// Set default fallback values for site permissions we want
// the user to be able to globally change.
pref("permissions.default.camera", 0);
pref("permissions.default.microphone", 0);
pref("permissions.default.geo", 0);
pref("permissions.default.xr", 0);
pref("permissions.default.desktop-notification", 0);
pref("permissions.default.shortcuts", 0);
pref("permissions.desktop-notification.postPrompt.enabled", true);
pref("permissions.desktop-notification.notNow.enabled", false);

pref("permissions.fullscreen.allowed", false);

// Force external link opens into the default user context ID instead of guessing
// the most appropriate one based on the URL (https://bugzilla.mozilla.org/show_bug.cgi?id=1874599#c8)
pref("browser.link.force_default_user_context_id_for_external_opens", false);

// 1=current window/tab, 2=new window, 3=new tab in most recent window
// handle external links (i.e. links opened from a different application)
// default: use browser.link.open_newwindow
// 1-3: see browser.link.open_newwindow for interpretation
pref("browser.link.open_newwindow.override.external", -1);

// 0: no restrictions - divert everything
// 1: don't divert window.open at all
// 2: don't divert window.open with features
pref("browser.link.open_newwindow.restriction", 2);
// If true, this pref causes windows opened by window.open to be forced into new
// tabs (rather than potentially opening separate windows, depending on
// window.open arguments) when the browser is in fullscreen mode.
// We set this differently on Mac because the fullscreen implementation there is
// different.
  pref("browser.link.open_newwindow.disabled_in_fullscreen", true);
  pref("browser.link.open_newwindow.disabled_in_fullscreen", false);
pref("browser.tabs.closeTabByDblclick", false);
pref("browser.tabs.closeWindowWithLastTab", true);
pref("browser.tabs.allowTabDetach", true);
// Open related links to a tab, e.g., link in current tab, at next to the
// current tab if |insertRelatedAfterCurrent| is true.  Otherwise, always
// append new tab to the end.
pref("browser.tabs.insertRelatedAfterCurrent", true);
// Open all links, e.g., bookmarks, history items at next to current tab
// if |insertAfterCurrent| is true.  Otherwise, append new tab to the end
// for non-related links. Note that if this is set to true, it will trump
// the value of browser.tabs.insertRelatedAfterCurrent.
pref("browser.tabs.insertAfterCurrent", false);
pref("browser.tabs.warnOnClose", false);
pref("browser.tabs.warnOnCloseOtherTabs", true);
pref("browser.tabs.warnOnOpen", true);
pref("browser.tabs.maxOpenBeforeWarn", 15);
pref("browser.tabs.loadInBackground", true);
pref("browser.tabs.opentabfor.middleclick", true);
pref("browser.tabs.loadDivertedInBackground", false);
pref("browser.tabs.loadBookmarksInBackground", false);
pref("browser.tabs.loadBookmarksInTabs", false);
pref("browser.tabs.tabMinWidth", 76);
// Users running in any of the following language codes will have the
// secondary text on tabs hidden due to size constraints and readability
// of the text at small font sizes.
pref("browser.tabs.secondaryTextUnsupportedLocales", "ar,bn,bo,ckb,fa,gu,he,hi,ja,km,kn,ko,lo,mr,my,ne,pa,si,ta,te,th,ur,zh");
//Control the visibility of Tab Manager Menu.
pref("browser.tabs.tabmanager.enabled", true);
// When tabs opened by links in other tabs via a combination of
// browser.link.open_newwindow being set to 3 and target="_blank" etc are
// closed:
// true   return to the tab that opened this tab (its owner)
// false  return to the adjacent tab (old default)
pref("browser.tabs.selectOwnerOnClose", true);
// This should match Chromium's audio indicator delay.
pref("browser.tabs.delayHidingAudioPlayingIconMS", 3000);
// Pref to control whether we use a separate privileged content process
// for about: pages. This pref name did not age well: we will have multiple
// types of privileged content processes, each with different privileges.
// types of privleged content processes, each with different privleges.
pref("browser.tabs.remote.separatePrivilegedContentProcess", true);

#if defined(NIGHTLY_BUILD) && !defined(MOZ_ASAN)
  // This pref will cause assertions when a remoteType triggers a process switch
  // to a new remoteType it should not be able to trigger.
  pref("browser.tabs.remote.enforceRemoteTypeRestrictions", true);
// Pref to control whether we use a separate privileged content process
// for certain mozilla webpages (which are listed in the pref
// browser.tabs.remote.separatedMozillaDomains).
pref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", true);

pref("browser.tabs.tooltipsShowPidAndActiveness", true);
pref("browser.tabs.tooltipsShowPidAndActiveness", false);
#ifdef NIGHTLY_BUILD
pref("browser.tabs.hoverPreview.enabled", true);
#else
pref("browser.tabs.hoverPreview.enabled", false);
#endif
pref("browser.tabs.hoverPreview.showThumbnails", true);
pref("browser.tabs.firefox-view.logLevel", "Warn");
// allow_eval_* is enabled on Firefox Desktop only at this
// point in time
pref("security.allow_eval_with_system_principal", false);
pref("security.allow_eval_in_parent_process", false);

pref("security.allow_parent_unrestricted_js_loads", false);
// Unload tabs when available memory is running low
#if defined(XP_MACOSX) || defined(XP_WIN)
    pref("browser.tabs.unloadOnLowMemory", true);
#else
    pref("browser.tabs.unloadOnLowMemory", false);
#endif
// Tab Unloader does not unload tabs whose last inactive period is longer than
// this value (in milliseconds).
pref("browser.tabs.min_inactive_duration_before_unload", 600000);

// Does middleclick paste of clipboard to new tab button
#ifdef UNIX_BUT_NOT_MAC
pref("browser.tabs.searchclipboardfor.middleclick", true);
#else
pref("browser.tabs.searchclipboardfor.middleclick", false);
#endif

#if defined(XP_MACOSX)
  // During low memory periods, poll with this frequency (milliseconds)
  // until memory is no longer low. Changes to the pref take effect immediately.
  // Browser restart not required. Chosen to be consistent with the windows
  // implementation, but otherwise the 10s value is arbitrary.
  pref("browser.lowMemoryPollingIntervalMS", 10000);

  // Pref to control the reponse taken on macOS when the OS is under memory
  // pressure. Changes to the pref take effect immediately. Browser restart not
  // required. The pref value is a bitmask:
  // 0x0: No response (other than recording for telemetry, crash reporting)
  // 0x1: Use the tab unloading feature to reduce memory use. Requires that
  //      the above "browser.tabs.unloadOnLowMemory" pref be set to true for tab
  //      unloading to occur.
  // 0x2: Issue the internal "memory-pressure" notification to reduce memory use
  // 0x3: Both 0x1 and 0x2.
  #if defined(NIGHTLY_BUILD)
  pref("browser.lowMemoryResponseMask", 3);
  #else