Skip to content

Common Overrides

yokoffing edited this page Jul 16, 2024 · 70 revisions

Instructions

  1. Open the user.js in a text editor such as Notepad.
  2. Add prefs from the options below.
  3. Save and close the file.
  4. Return to Getting Started.

Options

A user.js applies prefs in the order they are written.

So, if a pref is listed a second time, then the second value (yours) would override the first (Betterfox's).

my overrides section2

To enable certain functions, copy+paste the appropriate prefs to the MY OVERRIDES section of your user.js.


Color Theme

By default, Firefox follows the operating system theme (Light or Dark) for buttons, menus, and windows, but not for settings pages and websites. Betterfox ensures sub-pages and websites also match your system theme.

However, you can override this and force Firefox's settings pages and websites to use a Light or Dark theme.

  • → Settings → General → Language and Appearance → Website appearance
// PREF: preferred color scheme for websites and sub-pages
// Dark (0), Light (1), System (2), Browser (3)
user_pref("layout.css.prefers-color-scheme.content-override", 0); 

Downloads

Betterfox's default download settings balance user experience and security. However, some users prefer to customize these prefs. You can read about these prefs on #267.

Ask where to save files

  • → Settings → General → Files and Applications → Downloads → Always ask you where to save files
// PREF: always ask where to download
// true = Direct download
// false = The user is asked what to do
user_pref("browser.download.useDownloadDir", false);

New file types

  • → Settings → General → Files and Applications → Applications → What should Firefox do with other files?
// PREF: always ask how to handle new mimetypes
// false = Save files
// true = Ask whether to open or save files
user_pref("browser.download.always_ask_before_handling_new_types", false);

Password, credit card, and address management

The built-in password manager is disabled for security.

  • → Settings → Privacy & Security → Logins and Passwords → Ask to save logins and passwords for websites

We recommend using Bitwarden or 1Password to manage your credentials on multiple devices.

// PREF: restore login manager
user_pref("signon.rememberSignons", true);

// PREF: restore address and credit card manager
user_pref("extensions.formautofill.addresses.enabled", true);
user_pref("extensions.formautofill.creditCards.enabled", true);

Location requests

Location requests are blocked to minimize annoyances.

Manage your site exceptions to allow only for websites you want to ask for your location.

  • → Settings → Privacy & Security → Permissions → Location
// PREF: allow websites to ask you for your location
user_pref("permissions.default.geo", 0);

Site notifications

Site notifications are blocked to increase security and minimize annoyances.

Manage your site exceptions to allow only for websites you want to send you notifications.

  • → Settings → Privacy & Security → Permissions → Notifications
// PREF: allow websites to ask you to receive site notifications
user_pref("permissions.default.desktop-notification", 0);

New tab shortcuts

Top sites (pinned site shortcuts) are removed for a clean new tab page.

  • → Settings → Home → Firefox Home Content
// PREF: restore Top Sites on New Tab page
user_pref("browser.newtabpage.activity-stream.feeds.topsites", true); // Shortcuts
user_pref("browser.newtabpage.activity-stream.default.sites", ""); // clear default topsites

// PREF: remove sponsored content on New Tab page
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); // Sponsored shortcuts 
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); // Recommended by Pocket
user_pref("browser.newtabpage.activity-stream.showSponsored", false); // Sponsored Stories

// PREF: remove default Top Sites (Facebook, Twitter, etc.)
// [NOTE] This does not block you from adding your own.
user_pref("browser.newtabpage.activity-stream.default.sites", "");

Alternatives


Search settings

Allow search engine suggestions

Search suggestions are disabled in the URL bar to keep everything you type from going to Google.

  • → Settings → Search → Search Suggestions → Provide search suggestions
// PREF: restore search engine suggestions
user_pref("browser.search.suggest.enabled", true);

Change your default search engine

You can also select a default search engine just for Private Browsing windows. (This is an option after you apply the user.js.)

  • → Settings → Search → Default Search Engine

Change your default search engine to DuckDuckGo, or add a premium search engine like Kagi.


Containers

Enable container tabs if you want to login to the same site under different accounts.

You'll also want to install Multi-Account Containers for extra functionality (YouTube example).

// PREF: enable container tabs
user_pref("privacy.userContext.enabled", true);

GPU-accelerated Canvas2D

Add this pref if you use a dedicated GPU on a Windows PC. (It's already enabled on macOS and Linux.)

⚠️ May cause issues on some Windows machines using integrated GPUs.

// PREF: enable GPU-accelerated Canvas2D [WINDOWS]
user_pref("gfx.canvas.accelerated", true);

Scrolling

Firefox's default scrolling needs improvement.

Smoothfox provides a far better scroll experience.

Clone this wiki locally