Skip to content

Instantly share code, notes, and snippets.

@apfelchips apfelchips/user.js
Last active Feb 15, 2020

Embed
What would you like to do?
user.js
// soured from:
// https://github.com/pyllyukko/user.js/blob/master/user.js
// https://github.com/ghacksuserjs/ghacks-user.js/blob/master/user.js
// http://kb.mozillazine.org/About:config_entries
// https://gist.github.com/ruilapa/3207798
// https://jm42.github.io/compare-user.js/
// pref() <= change default, can be edited
// user_pref() <= override everything, defined setting will be set on startup
// more info:
// https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences
// reccomended addons
// https://addons.mozilla.org/en-US/firefox/addon/https-everywhere/
// https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/
// https://addons.mozilla.org/en-US/firefox/addon/cookie-autodelete/
// https://addons.mozilla.org/en-US/firefox/addon/open-link-in-browser-as/
// https://addons.mozilla.org/en-US/firefox/addon/keepass-helper-url-in-title/
// https://addons.mozilla.org/en-US/firefox/addon/uaswitcher/
// https://addons.mozilla.org/en-US/firefox/addon/ff2mpv/
user_pref("_user.js.parrot", "START");
user_pref("general.warnOnAboutConfig", false);
// fixed: user_pref("privacy.sanitize.pending",""); //macOS startup fix (double open on startup when using user.js) https://hg.mozilla.org/mozilla-central/file/tip/browser/modules/Sanitizer.jsm#l67
//// telemetry / reporting
user_pref("toolkit.telemetry.enabled", false);
user_pref("toolkit.telemetry.unified", false);
user_pref("toolkit.telemetry.server", "data:,");
user_pref("toolkit.telemetry.archive.enabled", false);
user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);
user_pref("datareporting.healthreport.uploadEnabled", false);
user_pref("datareporting.healthreport.service.enabled", false);
user_pref("datareporting.policy.dataSubmissionEnabled", false);
user_pref("browser.newtabpage.activity-stream.telemetry", false);
user_pref("browser.newtabpage.activity-stream.feeds.telemetry",false);
user_pref("browser.ping-centre.telemetry", false);
user_pref("browser.chrome.errorReporter.enabled", false);
user_pref("browser.chrome.errorReporter.submitUrl", "");
/// ssl error reporting
user_pref("security.ssl.errorReporting.automatic", false);
user_pref("security.ssl.errorReporting.enabled", false);
user_pref("security.ssl.errorReporting.url", "");
/// addon pings
user_pref("browser.selfsupport.enabled", false);
user_pref("browser.selfsupport.url", "");
/// crashreporting
user_pref("browser.tabs.crashReporting.sendReport", false);
user_pref("breakpad.reportURL", "");
user_pref("browser.tabs.crashReporting.sendReport", false);
user_pref("browser.crashReports.unsubmittedCheck.enabled", false);
user_pref("dom.ipc.plugins.flash.subprocess.crashreporter.enabled", false);
user_pref("dom.ipc.plugins.reportCrashURL", false);
// sends daily pings to Mozilla about extensions and recent startups
user_pref("extensions.getAddons.cache.enabled", false);
// disallow Firefox to make personalized extension recommendations
user_pref("browser.discovery.enabled", false);
/// safebrowsing
user_pref("_user.js.parrot", "safebrowsing");
user_pref("browser.safebrowsing.provider.google.reportURL", "");
user_pref("browser.safebrowsing.reportMalwareMistakeURL", "");
user_pref("browser.safebrowsing.reportPhishMistakeURL", "");
user_pref("browser.safebrowsing.reportPhishURL", "");
//// #fingerprinting
user_pref("_user.js.parrot", "fingerprinting");
pref("privacy.resistFingerprinting", true);
user_pref("dom.enable_performance", false);
user_pref("dom.enable_user_timing", false);
user_pref("dom.enable_resource_timing", false);
user_pref("media.video_stats.enabled", false);
user_pref("dom.network.enabled", false);
// Sends data to servers when leaving pages.
user_pref("beacon.enabled", false);
user_pref("device.sensors.enabled", false);
user_pref("dom.keyboardevent.code.enabled", false);
/// font fingerprinting
// use bundled fonts via resist.Fingerprinting: https://bugzilla.mozilla.org/show_bug.cgi?id=1336208
// Toggle Systemfonts
//user_pref("browser.display.use_document_fonts", 1);
// TOR macOS whitelist:
// user_pref("font.system.whitelist", "AppleGothic, Apple Color Emoji, Arial, Courier, Geneva, Georgia, Heiti TC, Helvetica, Helvetica Neue, .Helvetica Neue DeskInterface, Hiragino Kaku Gothic ProN, Lucida Grande, Monaco, Noto Sans Armenian, Noto Sans Bengali, Noto Sans Buginese, Noto Sans Canadian Aboriginal, Noto Sans Cherokee, Noto Sans Devanagari, Noto Sans Ethiopic, Noto Sans Gujarati, Noto Sans Gurmukhi, Noto Sans Kannada, Noto Sans Khmer, Noto Sans Lao, Noto Sans Malayalam, Noto Sans Mongolian, Noto Sans Myanmar, Noto Sans Oriya, Noto Sans Sinhala, Noto Sans Tamil, Noto Sans Telugu, Noto Sans Thaana, Noto Sans Tibetan, Noto Sans Yi, STHeiti, STIX Math, Tahoma, Thonburi, Times, Times New Roman, Verdana");
//// #geolocation
user_pref("_user.js.parrot", "geolocation");
user_pref("geo.enabled", "false");
user_pref("geo.security.allowinsecure", false);
user_pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); // use mozilla NLP
//// #webRTC
pref("media.peerconnection.enabled", false);
// prevent local ip leaks
user_pref("media.peerconnection.ice.no_host", true);
//// #webGL
pref("webgl.disabled", true);
// user_pref("webgl.enable-webgl2", false);
// user_pref("webgl.min_capability_mode", true); // too minimal to be good for anything :(
// user_pref("webgl.disable-extensions", true);
// user_pref("webgl.disable-fail-if-major-performance-caveat", true);
// user_pref("webgl.enable-debug-renderer-info", false);
// user_pref("webgl.dxgl.enabled", false);
//// #Tracking
user_pref("_user.js.parrot", "Tracking");
user_pref("privacy.firstparty.isolate", true);
pref("privacy.donottrackheader.enabled", true);
pref("privacy.trackingprotection.enabled", false);
pref("privacy.trackingprotection.pbmode.enabled", false);
user_pref("browser.contentblocking.rejecttrackers.reportBreakage.enabled",false); // disable Lightbulb in AddressBar
user_pref("browser.contentblocking.reportBreakage.enabled",false); // disable Lightbulb in AddressBar
// Disable Onboarding
user_pref("privacy.trackingprotection.ui.enabled", true);
user_pref("privacy.trackingprotection.introCount", 99); // disable intro
user_pref("browser.contentblocking.introCount", 99); // disable intro
// user_pref("urlclassifier.trackingTable", "test-track-simple,base-track-digest256"); // basic
user_pref("urlclassifier.trackingTable", "test-track-simple,base-track-digest256,content-track-digest256"); // strict
// PREF: Disable pinging URIs specified in HTML <a> ping= attributes
// http://kb.mozillazine.org/Browser.send_pings
user_pref("browser.send_pings", false);
user_pref("browser.send_pings.require_same_host", true);
///// caching (see about:cache)
///// http://kb.mozillazine.org/Browser.cache.memory.capacity
user_pref("browser.cache.memory.enable", true);
user_pref("browser.cache.memory.capacity", 131072); //128mb
user_pref("browser.cache.disk.enable", false);
user_pref("media.cache_size", 0);
user_pref("browser.cache.disk_cache_ssl", false);
user_pref("browser.cache.offline.enable", false);
//// prefetching
user_pref("network.prefetch-next", false);
user_pref("network.dns.disablePrefetch", true);
user_pref("network.dns.disablePrefetchFromHTTPS", true);
user_pref("network.http.speculative-parallel-limit", 0);
user_pref("network.predictor.enabled", false);
user_pref("network.predictor.enable-prefetch", false);
//// experiments
user_pref("network.allow-experiments", false);
user_pref("experiments.supported",false);
user_pref("experiments.enabled",false);
user_pref("experiments.manifest.uri", "");
user_pref("app.normandy.enabled", false);
user_pref("app.normandy.api_url", "");
user_pref("extensions.ui.experiment.hidden", true);
user_pref("network.allow-experiments", false);
user_pref("extensions.shield-recipe-client.enabled", false);
user_pref("extensions.shield-recipe-client.api_url", "");
user_pref("app.shield.optoutstudies.enabled", false);
// //// DRM, Codecs
// user_pref("_user.js.parrot", "DRM");
// user_pref("media.gmp-provider.enabled", false);
// user_pref("media.gmp-manager.url", "data:text/plain,");
// user_pref("media.gmp-manager.url.override", "data:text/plain,");
// user_pref("media.eme.enabled", false);
// user_pref("media.eme.apiVisible", false);
// user_pref("media.gmp-widevinecdm.visible", false);
// user_pref("media.gmp-widevinecdm.enabled", false);
// user_pref("media.gmp-widevinecdm.autoupdate", false);
// user_pref("media.gmp-eme-adobe.visible", false);
// user_pref("media.gmp-eme-adobe.enabled", false);
// user_pref("media.gmp-eme-adobe.autoupdate", false);
// /// OpenH264 codec
// user_pref("media.gmp-gmpopenh264.visible", false);
// user_pref("media.gmp-gmpopenh264.enabled", false);
// user_pref("media.gmp-gmpopenh264.autoupdate", false);
//// Search
user_pref("_user.js.parrot", "Search");
user_pref("browser.search.selectedEngine", "DuckDuckGo");
user_pref("browser.search.defaultenginename", "DuckDuckGo");
user_pref("browser.search.defaultenginename.US", "DuckDuckGo");
user_pref("browser.search.defaultenginename.DE", "DuckDuckGo");
user_pref("browser.search.defaulturl", "https://start.duckduckgo.com/?q=");
user_pref("browser.search.order.1", "DuckDuckGo");
user_pref("browser.search.hiddenOneOffs","Bing,Amazon.com,eBay,Google,Twitter");
user_pref("browser.search.suggest.enabled", true);
user_pref("browser.search.geoSpecificDefaults", false);
user_pref("browser.search.geoSpecificDefaults.url", "");
user_pref("browser.search.geoip.url", "");
user_pref("browser.search.update", false);
//// urlbar
user_pref("_user.js.parrot", "urlbar");
user_pref("browser.urlbar.oneOffSearches", false); // select search engines as icons
user_pref("browser.urlbar.autocomplete.enabled", true);
user_pref("browser.urlbar.suggest.history", true);
user_pref("browser.urlbar.suggest.bookmark", true);
user_pref("browser.urlbar.suggest.openpage", true);
user_pref("browser.urlbar.suggest.searches", false); //autosuggestions from search provider
user_pref("browser.urlbar.searchSuggestionsChoice", true); // nagging if you want to enable suggest.searches
user_pref("browser.urlbar.filter.javascript", true);
user_pref("browser.urlbar.trimURLs", false); // Don't trim HTTP off of URLs in the address bar.
user_pref("browser.urlbar.autoFill", true);// As you type, entries you have previously typed that closely match appear highlighted after your typed text
user_pref("browser.urlbar.autoFill.typed", true);
user_pref("browser.startup.page","https://start.duckduckgo.com");
user_pref("browser.startup.homepage","https://start.duckduckgo.com");
user_pref("startup.homepage_override_url","https://start.duckduckgo.com");
user_pref("startup.homepage_welcome_url","https://start.duckduckgo.com");
user_pref("browser.startup.homepage_override.mstone", "ignore"); // Suppress the "What's new" page
user_pref("browser.aboutHomeSnippets.updateUrl", "data:,");
//// bookmarks
// lockPref("browser.bookmarks.file", "~/.config/firefox/bookmarks.html"); // Symlinked
user_pref("browser.places.importBookmarksHTML", true);
user_pref("browser.bookmarks.max_backups", 0); // Bookmark Backups
user_pref("browser.bookmarks.restore_default_bookmarks", false); // stop adding Default Bookmarks
user_pref("browser.bookmarks.autoExportHTML", false); // there can only be one exporter!
//// about:newtab
user_pref("_user.js.parrot", "newtab");
user_pref("browser.newtabpage.activity-stream.feeds.section.highlights",false);
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
user_pref("browser.newtabpage.activity-stream.feeds.snippets", false);
user_pref("browser.newtabpage.activity-stream.showTopSites", true);
user_pref("browser.newtabpage.activity-stream.topSitesCount", 12);
user_pref("browser.newtabpage.activity-stream.migrationExpired", true); // import from other browsers
user_pref("browser.newtabpage.activity-stream.disableSnippets", true);
user_pref("browser.newtabpage.activity-stream.feeds.snippets", false);
user_pref("browser.newtabpage.introShown", true);
user_pref("browser.newtabpage.activity-stream.showSponsored", false);
user_pref("browser.newtabpage.enhanced", false); // "Suggested Articles"
user_pref("browser.newtabpage.directory.source", "data:text/plain,");
user_pref("browser.newtabpage.directory.ping", "data:text/plain,");
user_pref("browser.library.activity-stream.enabled", false);
user_pref("browser.newtabpage.activity-stream.enabled", false);
//// annoyances, tweaks
user_pref("network.IDN_show_punycode", true);
user_pref("media.autoplay.enabled", false);
user_pref("media.autoplay.enabled.user-gestures-needed", false);
pref("media.autoplay.default", 5); //block audio and video by default
pref("media.play-stand-alone", true);
// always ask for download directory
user_pref("browser.download.useDownloadDir", false);
//disable permissions bydefault
user_pref("permissions.default.desktop-notification", 2);
user_pref("permissions.default.camera", 2);
user_pref("permissions.default.geo", 2);
user_pref("permissions.default.microphone", 2);
user_pref("permissions.default.xr", 2); //virtual reality
// SYNC
user_pref("services.sync.enabled", false);
user_pref("identity.fxaccounts.enabled", false);
//// #UI / #UX
user_pref("browser.backspace_action", 0); // 0: Go back in history, 1: Page Up, 2: Nothing
user_pref("clipboard.autocopy", false); // copy contents of selections to the clipboard
user_pref("browser.ctrlTab.previews", false);
user_pref("browser.ctrlTab.recentlyUsedOrder", false);
user_pref("general.autoScroll", true); // Navigation Dot on Middle Click
user_pref("layout.spellcheckDefault", 2); // 0=none, 1-multi-line, 2=multi-line & single-line
// Don't try to guess domain names when entering an invalid domain name in URL bar
user_pref("browser.fixup.alternate.enabled", false);
user_pref("browser.tabs.warnOnClose", false);
user_pref("browser.tabs.warnOnCloseOtherTabs", false);
user_pref("full-screen-api.warning.delay", 0);
user_pref("full-screen-api.warning.timeout", 2500);
/// #Startup
user_pref("_user.js.parrot", "Startup");
user_pref("browser.slowStartup.notificationDisabled", true);
user_pref("browser.slowStartup.samples", 0);
user_pref("browser.slowStartup.maxSamples", 0);
user_pref("browser.rights.3.shown", true); //don't show EULA
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("browser.shell.didSkipDefaultBrowserCheckOnFirstRun", true);
//// #Value Added Services
user_pref("_user.js.parrot", "Value Added Services");
user_pref("pocket.enabled", false);
user_pref("browser.pocket.enabled", false);
user_pref("extensions.pocket.enabled", false);
user_pref("dom.flyweb.enabled", false); // IoT whatever
user_pref("browser.casting.enabled", false);
user_pref("signon.rememberSignons", false); // Disable Password Manager
user_pref("browser.pagethumbnails.capturing_disabled", true);
user_pref("browser.shell.shortcutFavicons", false);
user_pref("dom.gamepad.enabled", false);
user_pref("dom.vr.enabled", false);
user_pref("dom.vibrator.enabled", false);
// Trusted Recursive Resolver (DNS-over-HTTPS) (disabled)
user_pref("network.trr.mode", 0);
/// #Onboarding | #First Run | #Guides
user_pref("browser.onboarding.enabled", false);
user_pref("browser.onboarding.notification.finished", true);
user_pref("browser.feeds.showFirstRunUI", false);
user_pref("browser.usedOnWindows10", true);
user_pref("browser.usedOnWindows10.introURL", "");
user_pref("datareporting.healthreport.service.firstRun", false);
user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);
user_pref("browser.reader.detectedFirstArticle", false);
user_pref("browser.uitour.enabled", false);
/// #Reccomendation Popups (╯°□°)╯︵ ┻━┻
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
///// #Features we want
user_pref("_user.js.parrot", "Features we want");
//// https://wiki.mozilla.org/QA/ContainersTestPilot#Container_Prefs
// user_pref("privacy.userContext.enabled", true);
// user_pref("privacy.userContext.longPressBehavior", 2); // long press the "+" new tab button
// user_pref("privacy.userContext.enabled", true);
// user_pref("privacy.usercontext.about_newtab_segregation.enabled", true); // Using private containers for thumbnail loads
user_pref("security.webauth.u2f", true);
//// # Screenshot tool
user_pref("extensions.screenshots.disabled", false);
user_pref("extensions.screenshots.system-disabled", false);
user_pref("extensions.screenshots.upload-disabled", true);
user_pref("_user.js.parrot", "Trackpad Zooming");
//// #Trackpad Zooming
// pref("browser.gesture.pinch.in", "cmd_fullZoomReduce");
// pref("browser.gesture.pinch.in.shift", "cmd_fullZoomReset");
// pref("browser.gesture.pinch.out", "cmd_fullZoomEnlarge");
// pref("browser.gesture.pinch.out.shift", "cmd_fullZoomReset");
// pref("browser.gesture.pinch.latched", false);
pref("apz.allow_zooming", true);
pref("apz.allow_double_tap_zooming", true);
// pref("zoom.maxPercent", 500);
// pref("zoom.minPercent", 10);
///// #Shutdown Cleanup
user_pref("_user.js.parrot", "Shutdown Cleanup");
user_pref("privacy.sanitize.sanitizeOnShutdown", true);
user_pref("privacy.clearOnShutdown.cache", true);
user_pref("privacy.clearOnShutdown.cookies", false); // Managed by Cookie AutoDelete extension
user_pref("privacy.clearOnShutdown.downloads", true);
user_pref("privacy.clearOnShutdown.formdata", false);
user_pref("privacy.clearOnShutdown.history", false);
user_pref("privacy.clearOnShutdown.offlineApps", true);
user_pref("privacy.clearOnShutdown.sessions", true);
user_pref("privacy.clearOnShutdown.openWindows", true);
user_pref("privacy.clearOnShutdown.siteSettings", false);
user_pref("browser.helperApps.deleteTempFileOnExit", true);
//// #Clear recent history menu defaults
user_pref("_user.js.parrot", "Clear recent history");
user_pref("privacy.sanitize.timeSpan", 0);
user_pref("privacy.cpd.offlineApps", true);
user_pref("privacy.cpd.cache", true);
user_pref("privacy.cpd.cookies", false); // Managed by Cookie Autodelete
user_pref("privacy.cpd.downloads", true);
user_pref("privacy.cpd.formdata", true);
user_pref("privacy.cpd.history", true);
user_pref("privacy.cpd.sessions", true);
user_pref("privacy.cpd.siteSettings", true);
// #Cookies
user_pref("network.cookie.cookieBehavior", 1); //Allow cookies from originating server only
user_pref("network.cookie.lifetimePolicy", 0);
// URL protocol handlers
user_pref("_user.js.parrot", "URL protocol handlers");
user_pref("network.protocol-handler.warn-external-default", true);
user_pref("network.protocol-handler.external.http", false);
user_pref("network.protocol-handler.external.https", false);
user_pref("network.protocol-handler.external.javascript", false);
user_pref("network.protocol-handler.external.moz-extension", false);
user_pref("network.protocol-handler.external.ftp", false);
user_pref("network.protocol-handler.external.file", false);
user_pref("network.protocol-handler.external.about", false);
user_pref("network.protocol-handler.external.chrome", false);
user_pref("network.protocol-handler.external.blob", false);
user_pref("network.protocol-handler.external.data", false);
user_pref("network.protocol-handler.expose-all", false);
user_pref("network.protocol-handler.expose.http", true);
user_pref("network.protocol-handler.expose.https", true);
user_pref("network.protocol-handler.expose.javascript", true);
user_pref("network.protocol-handler.expose.moz-extension", true);
user_pref("network.protocol-handler.expose.ftp", true);
user_pref("network.protocol-handler.expose.file", true);
user_pref("network.protocol-handler.expose.about", true);
user_pref("network.protocol-handler.expose.chrome", true);
user_pref("network.protocol-handler.expose.blob", true);
user_pref("network.protocol-handler.expose.data", true);
//// #Plugins
user_pref("_user.js.parrot", "Plugins");
// set default plugin state (i.e. new plugins on discovery) to never activate
// 0=disabled, 1=ask to activate, 2=active
user_pref("plugin.default.state", 0);
user_pref("plugin.state.flash", 2);
user_pref("plugins.notifyMissingFlash", false);
user_pref("plugins.click_to_play", true);
user_pref("plugins.hide_infobar_for_missing_plugin", true);
//// #Extensions
user_pref("_user.js.parrot", "Extensions");
//// https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Alternative_distribution_options/Sideloading_add-ons#Installation_using_the_standard_extension_folders
//// https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Alternative_distribution_options/Add-ons_in_the_enterprise#Controlling_automatic_installation
user_pref("plugin.defaultXpi.state", 2);
user_pref("extensions.enabledScopes", 1);
user_pref("extensions.autoDisableScopes", 14);
user_pref("extensions.update.enabled", true);
user_pref("extensions.update.autoUpdate", true);
// enable extensions via extensions.json
user_pref("extensions.blocklist.url", "https://blocklist.addons.mozilla.org/blocklist/3/%APP_ID%/%APP_VERSION%/");
user_pref("extensions.blocklist.enabled", true);
user_pref("services.blocklist.update_enabled", true);
user_pref("extensions.webextensions.keepStorageOnUninstall", false);
user_pref("extensions.webextensions.keepUuidOnUninstall", false);
// #Security | #TLS
user_pref("_user.js.parrot", "Security | TLS");
// kind of fixed by first party isolation -- to prevent HSTS fingerprinting (https://www.privacy-handbuch.de/handbuch_21m.htm)
// rm SiteSecurityServiceState.txt & touch SiteSecurityServiceState.txt && chmod 555 SiteSecurityServiceState.txt
user_pref("security.tls.version.min", 1);
user_pref("security.tls.version.fallback-limit", 3);
user_pref("security.tls.version.max", 4);
user_pref("security.mixed_content.block_display_content", true);
user_pref("security.mixed_content.block_active_content", true);
pref("security.OCSP.require", true);
user_pref("security.ssl.enable_ocsp_stapling", true);
user_pref("security.ssl.enable_ocsp_must_staple", true);
user_pref("security.cert_pinning.enforcement_level", 2);
user_pref("network.stricttransportsecurity.preloadlist", true);
user_pref("security.pki.sha1_enforcement_level", 1);
user_pref("security.ssl.treat_unsafe_negotiation_as_broken", true);
user_pref("_user.js.parrot", "FINISHED");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.