Advertisement
PridefulMizuki

FF99 user.js override

Apr 21st, 2022
1,384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* my overrides */
  2.  
  3. /* override recipe: enable session restore ***/
  4. /* 0102: set startup page [SETUP-CHROME]
  5.  * 0=blank, 1=home, 2=last visited page, 3=resume previous session
  6.  * [NOTE] Session Restore is cleared with history (2811, 2812), and not used in Private Browsing mode
  7.  * [SETTING] General>Startup>Restore previous session ***/
  8. user_pref("browser.startup.page", 3);
  9. /* 1003: disable storing extra session data [SETUP-CHROME]
  10.  * define on which sites to save extra session data such as form content, cookies and POST data
  11.  * 0=everywhere, 1=unencrypted sites, 2=nowhere ***/
  12. user_pref("browser.sessionstore.privacy_level", 0);
  13. /* 2811: set/enforce what items to clear on shutdown (if 2810 is true) [SETUP-CHROME]
  14.  * These items do not use exceptions, it is all or nothing (1681701)
  15.  * [NOTE] If "history" is true, downloads will also be cleared
  16.  * [NOTE] "sessions": Active Logins: refers to HTTP Basic Authentication [1], not logins via cookies
  17.  * [NOTE] "offlineApps": Offline Website Data: localStorage, service worker cache, QuotaManager (IndexedDB, asm-cache)
  18.  * [SETTING] Privacy & Security>History>Custom Settings>Clear history when Firefox closes>Settings
  19.  * [1] https://en.wikipedia.org/wiki/Basic_access_authentication ***/
  20. user_pref("privacy.clearOnShutdown.history", false);   // [DEFAULT: true]
  21. user_pref("privacy.clearOnShutdown.downloads", false); // [DEFAULT: true]
  22. /* 2812: reset default items to clear with Ctrl-Shift-Del (to match 2811) [SETUP-CHROME]
  23.  * This dialog can also be accessed from the menu History>Clear Recent History
  24.  * Firefox remembers your last choices. This will reset them when you start Firefox
  25.  * [NOTE] Regardless of what you set "downloads" to, as soon as the dialog
  26.  * for "Clear Recent History" is opened, it is synced to the same as "history" ***/
  27. user_pref("privacy.cpd.history", false);  // [DEFAULT: true]
  28. /* addition not in the original recipe ***/
  29. user_pref("privacy.clearOnShutdown.cache", false);     // [DEFAULT: false]
  30. user_pref("privacy.cpd.cache", false);    // [DEFAULT: true]
  31.  
  32. /* 0103: set HOME+NEWWINDOW page
  33.  * about:home=Activity Stream (default, see 0105), custom URL, about:blank
  34.  * [SETTING] Home>New Windows and Tabs>Homepage and new windows ***/
  35. user_pref("browser.startup.homepage", "about:home");    // change back to blank (default) if performance issues
  36.  
  37. /* 0710: disable DNS-over-HTTPS (DoH) rollout [FF60+]
  38.  * 0=off by default, 2=TRR (Trusted Recursive Resolver) first, 3=TRR only, 5=explicitly off
  39.  * see "doh-rollout.home-region": USA Feb 2020, Canada July 2021 [3]
  40.  * [1] https://hacks.mozilla.org/2018/05/a-cartoon-intro-to-dns-over-https/
  41.  * [2] https://wiki.mozilla.org/Security/DOH-resolver-policy
  42.  * [3] https://blog.mozilla.org/mozilla/news/firefox-by-default-dns-over-https-rollout-in-canada/
  43.  * [4] https://www.eff.org/deeplinks/2020/12/dns-doh-and-odoh-oh-my-year-review-2020 ***/
  44. user_pref("network.trr.mode", 3);
  45. // more TRR stuffs
  46. user_pref("network.trr.uri", "https://dns.quad9.net/dns-query");
  47.  
  48. /* 0820: disable coloring of visited links
  49.  * [SETUP-HARDEN] Bulk rapid history sniffing was mitigated in 2010 [1][2]. Slower and more expensive
  50.  * redraw timing attacks were largely mitigated in FF77+ [3]. Using RFP (4501) further hampers timing
  51.  * attacks. Don't forget clearing history on exit (2811). However, social engineering [2#limits][4][5]
  52.  * and advanced targeted timing attacks could still produce usable results
  53.  * [1] https://developer.mozilla.org/docs/Web/CSS/Privacy_and_the_:visited_selector
  54.  * [2] https://dbaron.org/mozilla/visited-privacy
  55.  * [3] https://bugzilla.mozilla.org/1632765
  56.  * [4] https://earthlng.github.io/testpages/visited_links.html (see github wiki APPENDIX A on how to use)
  57.  * [5] https://lcamtuf.blogspot.com/2016/08/css-mix-blend-mode-is-bad-for-keeping.html ***/
  58. user_pref("layout.css.visited_links_enabled", false);
  59.  
  60. /* 1001: disable disk cache
  61.  * [SETUP-CHROME] If you think disk cache helps perf, then feel free to override this
  62.  * [NOTE] We also clear cache on exit (2811) ***/
  63. user_pref("browser.cache.disk.enable", true);
  64.  
  65. /* 1004: set the minimum interval between session save operations
  66.  * Increasing this can help on older machines and some websites, as well as reducing writes [1]
  67.  * [1] https://bugzilla.mozilla.org/1304389 ***/
  68. user_pref("browser.sessionstore.interval", 300000); // [DEFAULT: 15000]
  69.  
  70. /* 1601: control when to send a cross-origin referer
  71.  * 0=always (default), 1=only if base domains match, 2=only if hosts match
  72.  * [SETUP-WEB] Breakage: older modems/routers and some sites e.g banks, vimeo, icloud, instagram
  73.  * If "2" is too strict, then override to "0" and use Smart Referer extension (Strict mode + add exceptions) ***/
  74. user_pref("network.http.referer.XOriginPolicy", 0);
  75.  
  76. /* 2001: disable WebRTC (Web Real-Time Communication)
  77.  * Firefox uses mDNS hostname obfuscation on desktop (except Windows7/8) and the
  78.  * private IP is NEVER exposed, except if required in TRUSTED scenarios; i.e. after
  79.  * you grant device (microphone or camera) access
  80.  * [SETUP-HARDEN] Test first. Windows7/8 users only: behind a proxy who never use WebRTC
  81.  * [TEST] https://browserleaks.com/webrtc
  82.  * [1] https://groups.google.com/g/discuss-webrtc/c/6stQXi72BEU/m/2FwZd24UAQAJ
  83.  * [2] https://datatracker.ietf.org/doc/html/draft-ietf-mmusic-mdns-ice-candidates#section-3.1.1 ***/
  84. user_pref("media.peerconnection.enabled", false);
  85.  
  86. /* 2030: disable autoplay of HTML5 media [FF63+]
  87.  * 0=Allow all, 1=Block non-muted media (default), 5=Block all
  88.  * [NOTE] You can set exceptions under site permissions
  89.  * [SETTING] Privacy & Security>Permissions>Autoplay>Settings>Default for all websites ***/
  90. user_pref("media.autoplay.default", 5);
  91.  
  92. /* 2662: disable webextension restrictions on certain mozilla domains (you also need 4503) [FF60+]
  93.  * [1] https://bugzilla.mozilla.org/buglist.cgi?bug_id=1384330,1406795,1415644,1453988 ***/
  94. user_pref("extensions.webextensions.restrictedDomains", "");
  95.  
  96. /* 4504: enable RFP letterboxing [FF67+]
  97.  * Dynamically resizes the inner window by applying margins in stepped ranges [2]
  98.  * If you use the dimension pref, then it will only apply those resolutions.
  99.  * The format is "width1xheight1, width2xheight2, ..." (e.g. "800x600, 1000x1000")
  100.  * [SETUP-WEB] This is independent of RFP (4501). If you're not using RFP, or you are but
  101.  * dislike the margins, then flip this pref, keeping in mind that it is effectively fingerprintable
  102.  * [WARNING] DO NOT USE: the dimension pref is only meant for testing
  103.  * [1] https://bugzilla.mozilla.org/1407366
  104.  * [2] https://hg.mozilla.org/mozilla-central/rev/6d2d7856e468#l2.32 ***/
  105. user_pref("privacy.resistFingerprinting.letterboxing", false); // [HIDDEN PREF]
  106.  
  107. /* 4520: disable WebGL (Web Graphics Library)
  108.  * [SETUP-WEB] If you need it then override it. RFP still randomizes canvas for naive scripts ***/
  109. user_pref("webgl.disabled", false);
  110.  
  111. /* 5003: disable saving passwords
  112.  * [NOTE] This does not clear any passwords already saved
  113.  * [SETTING] Privacy & Security>Logins and Passwords>Ask to save logins and passwords for websites ***/
  114. user_pref("signon.rememberSignons", false);
  115.  
  116. /* 5506: disable WebAssembly [FF52+]
  117.  * Vulnerabilities [1] have increasingly been found, including those known and fixed
  118.  * in native programs years ago [2]. WASM has powerful low-level access, making
  119.  * certain attacks (brute-force) and vulnerabilities more possible
  120.  * [STATS] ~0.2% of websites, about half of which are for crytopmining / malvertising [2][3]
  121.  * [1] https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=wasm
  122.  * [2] https://spectrum.ieee.org/tech-talk/telecom/security/more-worries-over-the-security-of-web-assembly
  123.  * [3] https://www.zdnet.com/article/half-of-the-websites-using-webassembly-use-it-for-malicious-purposes ***/
  124. user_pref("javascript.options.wasm", false);
  125.  
  126. /* UPDATES ***/
  127. user_pref("app.update.auto", false); // [NON-WINDOWS] disable auto app updates
  128.     // [NOTE] You will still get prompts to update, and should do so in a timely manner
  129.     // [SETTING] General>Firefox Updates>Check for updates but let you choose to install them
  130.  
  131. /* APPEARANCE ***/
  132. user_pref("ui.prefersReducedMotion", 1); // disable chrome animations [FF77+] [RESTART] [HIDDEN PREF]
  133.     // 0=no-preference, 1=reduce: with RFP this only affects chrome
  134. user_pref("ui.systemUsesDarkTheme", 1); // [FF67+] [HIDDEN PREF]
  135.     // 0=light, 1=dark: with RFP this only affects chrome
  136.  
  137. /* UX BEHAVIOR ***/
  138. user_pref("browser.backspace_action", 2); // 0=previous page, 1=scroll up, 2=do nothing
  139. user_pref("browser.tabs.loadBookmarksInTabs", true); // open bookmarks in a new tab [FF57+]
  140. user_pref("view_source.tab", false); // view "page/selection source" in a new window [FF68+]
  141.  
  142. // ** Theme Related Options ****************************************************
  143. // userchrome.css usercontent.css activate
  144. user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); // [FF68+] allow userChrome/userContent
  145. // Proton Enabled #127 || Removed at 97 #328 (Maintained for compatibility with ESR)
  146. // user_pref("browser.proton.enabled", true);
  147. // Proton Tooltip
  148. user_pref("browser.proton.places-tooltip.enabled", true);
  149. // Fill SVG Color
  150. user_pref("svg.context-properties.content.enabled", true);
  151. // CSS Color Mix - 88 Above
  152. user_pref("layout.css.color-mix.enabled", true);
  153. // CSS Blur Filter - 88 Above
  154. user_pref("layout.css.backdrop-filter.enabled", true);
  155. // Restore Compact Mode - 89 Above
  156. user_pref("browser.compactmode.show", true);
  157. // about:home Search Bar - 89 Above
  158. user_pref("browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar", false);
  159. // Browser Theme Based Scheme - Will be activate 95 Above
  160. // user_pref("layout.css.prefers-color-scheme.content-override", 3);
  161. // ** Useful Options ***********************************************************
  162. // Integrated calculator at urlbar
  163. user_pref("browser.urlbar.suggest.calculator", true);
  164.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement