The Firefox user.js file stores user settings.
This is a convenient way to save your browser customizations and apply them on different machines.
All settings are based on arkenfox/user.js by default and override settings for sites to work normally.
- Disabled Firefox Accounts & Sync, built-in extensions
- Basically settings for security and usable in daily use
- Allow cross-logins, basic cookie policy
- Enabled saving session, keep logins and site data
- Disabled unused Web APIs and preset for permissions
- UI/UX settings
- Locale settings
- New Tab page, tabs, findbar, bookmarks configuration
Firefox supports advanced customization of its UI with user-defined CSS.
A userChrome.css file affects the browser's UI, and userContent.css file affects the browser's content, which is all Firefox-specific pages (about:).
- Added icon for sound-playing tab (animated)
- Hide unused buttons from Tabs and Toolbars
- Hide search engines from the search/url bar
- Reduce space for tabs
- Shown tab close button on hover
- Theme-based styles for Newtab page
- Multi-column for Addons page
Better choice β apply the script with an empty profile.
The script generates a new user.js configuration file with custom settings and overrides the user.js file and chrome directory (if they were) into the Firefox profile.
The file is loaded each time Firefox starts.
You can also change the values or add new ones in configuration files in the user.js-overrides directory or add your configuration JS-file.
π Backup your profile and close Firefox before running the script!
1. Clone repo:
git clone git@github.com:denis-g/firefox-settings.git
cd firefox-settings2. Set your Firefox profile path on the FIREFOX_PROFILE variable inside the config.ini file.
Example config:
Go to
about:profilespage and copyRoot Directorypath.
# macOS
# FIREFOX_PROFILE="/Users/denis-g/Library/Application Support/Firefox/Profiles/XXXXXXXX.profile_name"
# Linux
# FIREFOX_PROFILE="/home/denis-g/.mozilla/firefox/XXXXXXXX.profile_name"
FIREFOX_PROFILE="/Users/denis-g/Library/Application Support/Firefox/Profiles/dfk39fj39.default-nightly"3. ...and run main script:
sh setup.sh1. Use Git as above, download zip-archive, or execute commands on PowerShell:
# download this repo
Invoke-WebRequest "https://github.com/denis-g/firefox-user.js/archive/refs/heads/master.zip" -OutFile "$HOME\Downloads\firefox-settings.zip"
Expand-Archive "$HOME\Downloads\firefox-settings.zip" -DestinationPath "$HOME\Downloads\" -Force
# open directory
explorer "$HOME\Downloads\firefox-settings-master"This will upload the repo into your Downloads\firefox-settings-master directory.
2. Set your Firefox profile path on the FIREFOX_PROFILE variable inside the config.ini file.
Example config:
Go to
about:profilespage and copyRoot Directorypath.
# Windows
# FIREFOX_PROFILE="C:\Users\denis-g\AppData\Roaming\Mozilla\Firefox\Profiles\XXXXXXXX.profile_name"
FIREFOX_PROFILE="C:\Users\denis-g\AppData\Roaming\Mozilla\Firefox\Profiles\dfk39fj39.default-nightly"3. ...and run main script setup.bat.
- Close Firefox
- Execute
setup.shorsetup.batscript, as above - Run Firefox
- On
about:configpage execute the cleanup script
- By default,
pushandweb notificationsare disabled β the site can't send desktop notifications for Firefox.
- uBlock Origin (enable all Privacy settings and lists)
- Facebook Container
- Google Container
- CSS Exfil Protection
