Skip to content

Instantly share code, notes, and snippets.

@pegvin
Last active May 6, 2024 12:31
Show Gist options
  • Save pegvin/8b2002cd2f63f9ab459cf3bb36146abf to your computer and use it in GitHub Desktop.
Save pegvin/8b2002cd2f63f9ab459cf3bb36146abf to your computer and use it in GitHub Desktop.
FastFox - my firefox user.js & visual config

How to install

  • copy the user.js to any of the corresponding path for your OS listed below.
  • copy the userChrome.css & userContent.css into the chrome folder (create one if doesn't exist) in any of the corresponding path for your OS listed below.
OS Path
Windows %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.your_profile_name\
Windows (portable) [firefox directory]\Data\profile\
Linux ~/.mozilla/firefox/XXXXXXXX.your_profile_name/
OS X ~/Library/Application Support/Firefox/Profiles/XXXXXXXX.your_profile_name

Notes

  • DNS over HTTPS is enabled & will use Google DNS
  • Being used on Firefox 125.0.1 (64-bit)

Addons

Credits

Edits

  • 28, Apr 2024
    • Fixed Cloudflare Captcha Not Working
    • Enabled DNS over HTTP
  • 04, May 2024
  • 06, May 2024
    • Fix Broken Video Playback
// Don't show me any warning on about:config since god knows what i am doing
user_pref("browser.aboutConfig.showWarning", false);
// Disable accessibility settings since by gods grace i am mentally disabled on physically
user_pref("accessibility.force_disabled", 1);
user_pref("devtools.accessibility.enabled", false);
// Enable userChrome.css/userContent.css
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
// Less the number, less the ram, less the responsiveness
user_pref("dom.ipc.processCount", 2);
user_pref("dom.ipc.processCount.webIsolated", 2);
user_pref("extensions.pocket.enabled", false);
user_pref("extensions.pocket.api", "127.0.0.1");
// "Allow Firefox to make personalized extension recommendations"
user_pref("privacy.donottrackheader.enabled", true);
// Enable DNS over HTTPS & Use Google DNS
user_pref("network.trr.mode", 3); // Default=0, Look into "Enable secure DNS using:" @ about:preferences#privacy
user_pref("network.trr.uri", "https://dns.google/dns-query");
user_pref("network.trr.custom_uri", "https://dns.google/dns-query");
// Unload inactive tabs to save system memory
user_pref("browser.tabs.unloadOnLowMemory", true);
// Enable ffmpeg VAAPI
user_pref("media.ffmpeg.vaapi.enabled", true);
// https://www.reddit.com/r/firefox/comments/kwjv1d/comment/gj4x69i/
user_pref("browser.tabs.remote.dataUriInDefaultWebProcess", true);
user_pref("browser.tabs.remote.separateFileUriProcess", false);
user_pref("dom.ipc.keepProcessesAlive.privilegedabout", 0);
user_pref("dom.ipc.processCount.privilegedabout", 0);
user_pref("dom.ipc.processCount.privilegedmozilla", 0);
user_pref("dom.ipc.processPrelaunch.enabled", false);
user_pref("dom.ipc.processPrelaunch.fission.number", 0);
user_pref("dom.noopener.newprocess.enabled", false);
user_pref("dom.vr.process.enabled", false);
user_pref("layers.gpu-process.enabled", false);
// user_pref("media.rdd-process.enabled", false); // Breaks Video Playback
/** SANITIZE ON SHUTDOWN : ALL OR NOTHING ***/
/* 2810: enable Firefox to clear items on shutdown (2811)
* [SETTING] Privacy & Security>History>Custom Settings>Clear history when Firefox closes ***/
user_pref("privacy.sanitize.sanitizeOnShutdown", true);
/* 2811: set/enforce what items to clear on shutdown (if 2810 is true) [SETUP-CHROME]
* These items do not use exceptions, it is all or nothing (1681701)
* [NOTE] If "history" is true, downloads will also be cleared
* [NOTE] "sessions": Active Logins: refers to HTTP Basic Authentication [1], not logins via cookies
* [NOTE] "offlineApps": Offline Website Data: localStorage, service worker cache, QuotaManager (IndexedDB, asm-cache)
* [SETTING] Privacy & Security>History>Custom Settings>Clear history when Firefox closes>Settings
* [1] https://en.wikipedia.org/wiki/Basic_access_authentication ***/
user_pref("privacy.clearOnShutdown.cache", true); // [DEFAULT: true]
user_pref("privacy.clearOnShutdown.downloads", true); // [DEFAULT: true]
user_pref("privacy.clearOnShutdown.formdata", false); // [DEFAULT: true]
user_pref("privacy.clearOnShutdown.history", false); // [DEFAULT: true]
user_pref("privacy.clearOnShutdown.sessions", false); // [DEFAULT: true]
user_pref("privacy.clearOnShutdown.offlineApps", false); // [DEFAULT: false]
user_pref("privacy.clearOnShutdown.cookies", false);
user_pref("privacy.clearOnShutdown.siteSettings", false); // [DEFAULT: false]
// Accelerate Rendering Using GPU & Use WebRender Engine
// user_pref("gfx.webrender.enabled", true);
user_pref("gfx.webrender.all", true);
user_pref("gfx.webrender.batched-texture-uploads", true);
// user_pref("gfx.webrender.fallback.software", false);
user_pref("gfx.canvas.accelerated", true);
// PREF: page reflow timer
// Rather than wait until a page has completely downloaded to display it to the user,
// web browsers will periodically render what has been received to that point.
// Because reflowing the page every time additional data is received slows down
// total page load time, a timer was added so that the page would not reflow too often.
// This preference specfies whether that timer is active.
// [1] https://kb.mozillazine.org/Content.notify.ontimer
// true = do not reflow pages at an interval any higher than that specified by content.notify.interval (default)
// false = reflow pages whenever new data is received
user_pref("content.notify.ontimer", true);
user_pref("content.notify.interval", 800000); // (.10s); alt=800000 (.80s)
// PREF: frequency switch threshold [HIDDEN]
// Raising the value will make the application more responsive at the expense of page load time.
user_pref("content.interrupt.parsing", true); // [HIDDEN]
user_pref("content.switch.threshold", 1500000); // alt=1500000; default=750000; [HIDDEN]
user_pref("dom.serviceWorkers.enabled", false);
user_pref("dom.webnotifications.enabled", false);
user_pref("dom.enable_performance", false);
user_pref("dom.enable_resource_timing", true); // NOTICE: Disabling resource timing API breaks some DDoS protection pages (Cloudflare)
user_pref("dom.enable_user_timing", false);
// user_pref("dom.webaudio.enabled", false); // NOTICE: Web Audio API is required for Unity web player/games
user_pref("dom.netinfo.enabled", false);
user_pref("dom.battery.enabled", false);
user_pref("dom.gamepad.enabled", false);
user_pref("dom.vr.enabled", false);
user_pref("dom.vibrator.enabled", false);
// Geo location
user_pref("geo.enabled", false);
user_pref("geo.provider.geoclue.always_high_accuracy", false);
user_pref("geo.provider.use_geoclue", false);
user_pref("geo.provider.network.url", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
// PREF: Don't reveal your internal IP when WebRTC is enabled (Firefox >= 42)
user_pref("media.peerconnection.ice.default_address_only", true);
user_pref("media.peerconnection.ice.no_host", true);
// PREF: Disable "beacon" asynchronous HTTP transfers (used for analytics)
user_pref("beacon.enabled", false);
// PREF: Disable speech recognition
user_pref("media.webspeech.recognition.enable", false);
// PREF: Disable speech synthesis
user_pref("media.webspeech.synth.enabled", false);
// PREF: Disable sensor API
user_pref("device.sensors.enabled", false);
// PREF: Disable pinging URIs specified in HTML <a> ping= attributes
user_pref("browser.send_pings", false);
// PREF: When browser pings are enabled, only allow pinging the same host as the origin page
user_pref("browser.send_pings.require_same_host", true);
// PREF: Do not automatically send selection to clipboard on some Linux platforms
user_pref("clipboard.autocopy", false);
// PREF: Send DNS request through SOCKS when SOCKS proxying is in use
user_pref("network.proxy.socks_remote_dns", true);
// PREF: Don't monitor OS online/offline connection state
user_pref("network.manage-offline-status", false);
// PREF: Disable JAR from opening Unsafe File Types
// http://kb.mozillazine.org/Network.jar.open-unsafe-types
// CIS Mozilla Firefox 24 ESR v1.0.0 - 3.7
user_pref("network.jar.open-unsafe-types", false);
// CIS 2.7.4 Disable Scripting of Plugins by JavaScript
// http://forums.mozillazine.org/viewtopic.php?f=7&t=153889
user_pref("security.xpconnect.plugin.unrestricted", false);
// PREF: Set File URI Origin Policy
// http://kb.mozillazine.org/Security.fileuri.strict_origin_policy
// CIS Mozilla Firefox 24 ESR v1.0.0 - 3.8
user_pref("security.fileuri.strict_origin_policy", true);
// PREF: Disable Displaying Javascript in History URLs
// http://kb.mozillazine.org/Browser.urlbar.filter.javascript
// CIS 2.3.6
user_pref("browser.urlbar.filter.javascript", true);
// PREF: Disable video stats to reduce fingerprinting threat
user_pref("media.video_stats.enabled", false);
// PREF: Ensure you have a security delay when installing add-ons (milliseconds)
user_pref("security.dialog_enable_delay", 1000);
// PREF: Require signatures
// https://wiki.mozilla.org/Addons/Extension_Signing
user_pref("xpinstall.signatures.required", true);
// PREF: dom.ipc.plugins don't send the visited URL in the crash report
user_pref("dom.ipc.plugins.reportCrashURL", false);
// PREF: When Flash is enabled, download and use Mozilla SWF URIs blocklist
user_pref("browser.safebrowsing.blockedURIs.enabled", true);
// PREF: Disable remote debugging
user_pref("devtools.debugger.remote-enabled", false);
user_pref("devtools.chrome.enabled", false);
user_pref("devtools.debugger.force-local", true);
// PREF: Disable Mozilla telemetry/experiments
user_pref("toolkit.telemetry.enabled", false);
user_pref("toolkit.telemetry.unified", false);
user_pref("toolkit.telemetry.archive.enabled", false);
// PREF: Disable the UITour backend
user_pref("browser.uitour.enabled", false);
// PREF: disable mozAddonManager Web API [FF57+]
user_pref("privacy.resistFingerprinting.block_mozAddonManager", true);
// PREF: disable showing about:blank/maximized window as soon as possible during startup [FF60+]
user_pref("browser.startup.blankWindow", false);
// PREF: Disable collection/sending of the health report (healthreport.sqlite*)
user_pref("datareporting.healthreport.uploadEnabled", false);
user_pref("datareporting.policy.dataSubmissionEnabled", false);
// PREF: Disable Shield/Heartbeat/Normandy (Mozilla user rating telemetry)
user_pref("app.normandy.enabled", false);
user_pref("app.normandy.api_url", "");
user_pref("app.shield.optoutstudies.enabled", false);
// PREF: Enable blocking reported web forgeries
user_pref("browser.safebrowsing.phishing.enabled", true);
// PREF: Enable blocking reported attack sites
// http://kb.mozillazine.org/Browser.safebrowsing.malware.enabled
user_pref("browser.safebrowsing.malware.enabled", true);
// PREF: Disable querying Google Application Reputation database for downloaded binary files
user_pref("browser.safebrowsing.downloads.remote.enabled", false);
// PREF: Disable prefetching of <link rel="next"> URLs
user_pref("network.prefetch-next", false);
// PREF: Disable DNS prefetching
user_pref("network.dns.disablePrefetch", false);
user_pref("network.dns.disablePrefetchFromHTTPS", false);
// PREF: Disable the predictive service (Necko)
user_pref("network.predictor.enabled", false);
// PREF: Reject .onion hostnames before passing the to DNS
user_pref("network.dns.blockDotOnion", true);
// PREF: Disable speculative pre-connections
user_pref("network.http.speculative-parallel-limit", 0);
// PREF: Disable downloading homepage snippets/messages from Mozilla
user_pref("browser.aboutHomeSnippets.updateUrl", "");
// PREF: Disable automatic captive portal detection (Firefox >= 52.0)
user_pref("network.captive-portal-service.enabled", false);
// PREF: Disable (parts of?) "TopSites"
user_pref("browser.topsites.contile.enabled", false);
user_pref("browser.newtabpage.activity-stream.feeds.topsites", true); // Shortcuts
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);
// PREF: Don't send referer headers when following links across different domains
user_pref("network.http.referer.XOriginPolicy", 2);
// PREF: Enable first-party isolation
user_pref("privacy.firstparty.isolate", true);
// PREF: Spoof User-agent (disabled)
// user_pref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0");
// user_pref("general.appname.override", "Netscape");
// user_pref("general.appversion.override", "5.0 (Windows)");
// user_pref("general.platform.override", "Win32");
// user_pref("general.oscpu.override", "Windows NT 6.1");
// user_pref("dom.maxHardwareConcurrency", 2); // PREF: Spoof dual-core CPU
// PREF: Set max cache capacity (bytes)
user_pref("browser.cache.offline.capacity", 64000); // Default=512000
// PREF: Disable disk cache
user_pref("browser.cache.disk.enable", false);
// PREF: Disable memory cache (disabled)
user_pref("browser.cache.memory.enable", false);
// PREF: Disable Caching of SSL Pages
user_pref("browser.cache.disk_cache_ssl", false);
// PREF: Show in-content login form warning UI for insecure login fields
user_pref("security.insecure_field_warning.contextual.enabled", true);
// PREF: Delete temporary files on exit
user_pref("browser.helperApps.deleteTempFileOnExit", true);
// PREF: Disable Snippets
user_pref("browser.newtabpage.activity-stream.feeds.snippets", false);
// PREF: Disable Activity Stream
user_pref("browser.newtabpage.activity-stream.enabled", false);
// PREF: Disable new tab tile ads & preload
user_pref("browser.newtabpage.enhanced", false);
user_pref("browser.newtab.preload", false);
// PREF: Disable Mozilla VPN ads on the about:protections page
user_pref("browser.vpn_promo.enabled", false);
// PREF: Force Punycode for Internationalized Domain Names
user_pref("network.IDN_show_punycode", true);
// PREF: Do not check if Firefox is the default browser
user_pref("browser.shell.checkDefaultBrowser", false);
// PREF: When password manager is enabled, lock the password storage periodically
// CIS Version 1.2.0 October 21st, 2011 2.5.3 Disable Prompting for Credential Storage
// user_pref("security.ask_for_password", 2);
// PREF: Lock the password storage every 1 minutes (default: 30)
// user_pref("security.password_lifetime", 1);
/*
* penguinFox
* by p3nguin-kun
*/
/* config */
* {
--animation-speed: 0.2s;
--button-corner-rounding: 30px;
--urlbar-container-height: 40px !important;
--urlbar-min-height: 30px !important;
--urlbar-height: 30px !important;
--urlbar-toolbar-height: 38px !important;
--moz-hidden-unscrollable: scroll !important;
--toolbarbutton-border-radius: 3px !important;
--tabs-border-color: transparent;
}
:root {
--window: -moz-Dialog !important;
--secondary: color-mix(in srgb, currentColor 5%, -moz-Dialog) !important;
--uc-border-radius: 0px;
--uc-status-panel-spacing: 0px;
--uc-page-action-margin: 7px;
}
/* animation and effect */
#nav-bar:not([customizing]) {
visibility: visible;
margin-top: -40px;
transition-delay: 0.1s;
filter: alpha(opacity=0);
opacity: 0;
transition: visibility, ease var(--animation-speed), margin-top, ease var(--animation-speed), opacity, ease var(--animation-speed),
rotate, ease var(--animation-speed) !important;
}
#nav-bar:hover,
#nav-bar:focus-within,
#urlbar[focused='true'],
#identity-box[open='true'],
#titlebar:hover + #nav-bar:not([customizing]),
#toolbar-menubar:not([inactive='true']) ~ #nav-bar:not([customizing]) {
visibility: visible;
margin-top: 0px;
filter: alpha(opacity=100);
opacity: 100;
margin-bottom: -0.2px;
}
#PersonalToolbar {
margin-top: 0px;
}
#nav-bar .toolbarbutton-1[open='true'] {
visibility: visible;
opacity: 100;
}
:root:not([customizing]) :hover > .tabbrowser-tab:not(:hover) {
transition: blur, ease 0.1s !important;
}
:root:not([customizing]) :not(:hover) > .tabbrowser-tab {
transition: blur, ease 0.1s !important;
}
#tabbrowser-tabs .tab-label-container[customizing] {
color: transparent;
transition: ease 0.1s;
transition-delay: 0.2s;
}
/* Automatically Hide Tab Icons Tab is Not Hovered */
/* .tabbrowser-tab:not([pinned]) .tab-icon-image ,.bookmark-item .toolbarbutton-icon{opacity: 0!important; transition: .15s !important; width: 0!important; padding-left: 16px!important} */
/* .tabbrowser-tab:not([pinned]):hover .tab-icon-image,.bookmark-item:hover .toolbarbutton-icon{opacity: 100!important; transition: .15s !important; display: inline-block!important; width: 16px!important; padding-left: 0!important} */
/* .tabbrowser-tab:not([hover]) .tab-icon-image,.bookmark-item:not([hover]) .toolbarbutton-icon{padding-left: 0!important} */
/* Removes annoying buttons and spaces */
.titlebar-spacer[type="pre-tabs"], .titlebar-spacer[type="post-tabs"]{display: none !important}
#tabbrowser-tabs{border-inline-start-width: 0!important}
/* Makes some buttons nicer */
#PanelUI-menu-button, #unified-extensions-button, #reload-button, #stop-button {padding: 2px !important}
#reload-button, #stop-button{margin: 1px !important;}
/* X-button */
:root {
--show-tab-close-button: none;
--show-tab-close-button-hover: -moz-inline-block;
}
.tabbrowser-tab:not([pinned]) .tab-close-button { display: var(--show-tab-close-button) !important; }
.tabbrowser-tab:not([pinned]):hover .tab-close-button { display: var(--show-tab-close-button-hover) !important }
/* tabbar */
/* Hide the secondary Tab Label
* e.g. playing indicator (the text, not the icon) */
.tab-secondary-label { display: none !important; }
:root {
--toolbarbutton-border-radius: 0 !important;
--tab-border-radius: 0 !important;
--tab-block-margin: 0 !important;
}
.tabbrowser-tab:is([visuallyselected='true'], [multiselected])
> .tab-stack
> .tab-background {
box-shadow: none !important;
}
.tab-background {
border-right: 0px solid rgba(0, 0, 0, 0) !important;
margin-left: -1px !important;
}
.tabbrowser-tab[last-visible-tab='true'] {
padding-inline-end: 0 !important;
}
#tabs-newtab-button {
padding-left: 0 !important;
}
/* multi tab selection */
#tabbrowser-tabs:not([noshadowfortests]) .tabbrowser-tab:is([multiselected])
> .tab-stack
> .tab-background:-moz-lwtheme { outline-color: var(--toolbarseparator-color) !important; }
/* remove gap after pinned tabs */
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) { margin-inline-start: 0 !important; }
/* Removes annoying border */
#navigator-toolbox{border:none !important;}
/* Removes the annoying rainbow thing from the hamburger */
#appMenu-fxa-separator{border-image:none !important;}
@-moz-document url-prefix(about:){
/* Removes the scrollbar on some places */
body,html{overflow-y: auto}
/* Devtools */
@-moz-document url-prefix(about:devtools){
#toolbox-container{margin-top: 10px !important}
.devtools-tabbar{background: transparent !important}
.devtools-tab-line{border-radius: 0 0 5px 5px}
.customize-animate-enter-done,.customize-menu,.top-site-outer:hover,button{background-color: transparent!important}}
/* Newtab */
@-moz-document url("about:home"), url("about:newtab"){
.search-wrapper .search-handoff-button .fake-caret {top: 13px !important; inset-inline-start: 48px !important}
.search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important}
.search-wrapper .search-handoff-button .fake-caret{top: 13px !important; inset-inline-start: 48px !important}
.search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important}
.outer-wrapper .search-wrapper{padding: 0px !important; display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; align-content: space-around !important; gap: 20px 10px !important}
.search-wrapper .logo-and-wordmark .logo{background-size: 60px !important; height: 60px !important; width: 60px !important}
.search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important}
.search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important}
.outer-wrapper.ds-outer-wrapper-breakpoint-override.only-search.visible-logo{display: flex !important; padding-top: 0px !important;vertical-align: middle}
.customize-menu{border-radius: 10px 0 0 10px !important}
#root > div{align-items: center; display: flex}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment