mirror of
https://github.com/arkenfox/user.js.git
synced 2025-09-01 09:28:31 +02:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
62a68f0814 | |||
be376afc1e | |||
f5e54b4a70 | |||
7135907b2f | |||
12ca83b550 | |||
e4a85c30c1 | |||
45d23f8d75 | |||
40e8e1acbe | |||
6789dc7fef | |||
5eaa8196e2 |
@ -2,33 +2,54 @@
|
||||
|
||||
## prefs.js cleaner for Linux/Mac
|
||||
## author: @claustromaniac
|
||||
## version: 1.5
|
||||
## version: 1.6
|
||||
|
||||
## special thanks to @overdodactyl and @earthlng for a few snippets that I stol..*cough* borrowed from the updater.sh
|
||||
|
||||
currdir=$(pwd)
|
||||
## DON'T GO HIGHER THAN VERSION x.9 !! ( because of ASCII comparison in update_prefsCleaner() )
|
||||
|
||||
readonly CURRDIR=$(pwd)
|
||||
|
||||
## get the full path of this script (readlink for Linux, greadlink for Mac with coreutils installed)
|
||||
sfp=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)
|
||||
SCRIPT_FILE=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)
|
||||
|
||||
## fallback for Macs without coreutils
|
||||
if [ -z "$sfp" ]; then sfp=${BASH_SOURCE[0]}; fi
|
||||
[ -z "$SCRIPT_FILE" ] && SCRIPT_FILE=${BASH_SOURCE[0]}
|
||||
|
||||
## change directory to the Firefox profile directory
|
||||
cd "$(dirname "${sfp}")"
|
||||
|
||||
AUTOUPDATE=true
|
||||
QUICKSTART=false
|
||||
|
||||
## download method priority: curl -> wget
|
||||
DOWNLOAD_METHOD=''
|
||||
if command -v curl >/dev/null; then
|
||||
DOWNLOAD_METHOD='curl --max-redirs 3 -so'
|
||||
elif command -v wget >/dev/null; then
|
||||
DOWNLOAD_METHOD='wget --max-redirect 3 --quiet -O'
|
||||
else
|
||||
AUTOUPDATE=false
|
||||
echo -e "No curl or wget detected.\nAutomatic self-update disabled!"
|
||||
fi
|
||||
|
||||
fQuit() {
|
||||
## change directory back to the original working directory
|
||||
cd "${currdir}"
|
||||
cd "${CURRDIR}"
|
||||
[ "$1" -eq 0 ] && echo -e "\n$2" || echo -e "\n$2" >&2
|
||||
exit $1
|
||||
}
|
||||
|
||||
fUsage() {
|
||||
echo -e "\nUsage: $0 [-s]"
|
||||
echo -e "\nUsage: $0 [-ds]"
|
||||
echo -e "
|
||||
Optional Arguments:
|
||||
-s Start immediately"
|
||||
-s Start immediately
|
||||
-d Don't auto-update prefsCleaner.sh"
|
||||
}
|
||||
|
||||
download_file() { # expects URL as argument ($1)
|
||||
declare -r tf=$(mktemp)
|
||||
|
||||
$DOWNLOAD_METHOD "${tf}" "$1" &>/dev/null && echo "$tf" || echo '' # return the temp-filename or empty string on error
|
||||
}
|
||||
|
||||
fFF_check() {
|
||||
@ -40,6 +61,24 @@ fFF_check() {
|
||||
done
|
||||
}
|
||||
|
||||
## returns the version number of a prefsCleaner.sh file
|
||||
get_prefsCleaner_version() {
|
||||
echo "$(sed -n '5 s/.*[[:blank:]]\([[:digit:]]*\.[[:digit:]]*\)/\1/p' "$1")"
|
||||
}
|
||||
|
||||
## updates the prefsCleaner.sh file based on the latest public version
|
||||
update_prefsCleaner() {
|
||||
declare -r tmpfile="$(download_file 'https://raw.githubusercontent.com/arkenfox/user.js/master/prefsCleaner.sh')"
|
||||
[ -z "$tmpfile" ] && echo -e "Error! Could not download prefsCleaner.sh" && return 1 # check if download failed
|
||||
|
||||
[[ $(get_prefsCleaner_version "$SCRIPT_FILE") == $(get_prefsCleaner_version "$tmpfile") ]] && return 0
|
||||
|
||||
mv "$tmpfile" "$SCRIPT_FILE"
|
||||
chmod u+x "$SCRIPT_FILE"
|
||||
"$SCRIPT_FILE" "$@" -d
|
||||
exit 0
|
||||
}
|
||||
|
||||
fClean() {
|
||||
# the magic happens here
|
||||
prefs="@@"
|
||||
@ -78,19 +117,37 @@ fStart() {
|
||||
fQuit 0 "All done!"
|
||||
}
|
||||
|
||||
|
||||
while getopts "sd" opt; do
|
||||
case $opt in
|
||||
s)
|
||||
QUICKSTART=true
|
||||
;;
|
||||
d)
|
||||
AUTOUPDATE=false
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
## change directory to the Firefox profile directory
|
||||
cd "$(dirname "${SCRIPT_FILE}")"
|
||||
|
||||
[ "$AUTOUPDATE" = true ] && update_prefsCleaner "$@"
|
||||
|
||||
echo -e "\n\n"
|
||||
echo " ╔══════════════════════════╗"
|
||||
echo " ║ prefs.js cleaner ║"
|
||||
echo " ║ by claustromaniac ║"
|
||||
echo " ║ v1.5 ║"
|
||||
echo " ║ v1.6 ║"
|
||||
echo " ╚══════════════════════════╝"
|
||||
echo -e "\nThis script should be run from your Firefox profile directory.\n"
|
||||
echo "It will remove any entries from prefs.js that also exist in user.js."
|
||||
echo "This will allow inactive preferences to be reset to their default values."
|
||||
echo -e "\nThis Firefox profile shouldn't be in use during the process.\n"
|
||||
echo -e "\nIn order to proceed, select a command below by entering its corresponding number.\n"
|
||||
|
||||
[ "$1" == '-s' ] && fStart
|
||||
[ "$QUICKSTART" = true ] && fStart
|
||||
|
||||
echo -e "\nIn order to proceed, select a command below by entering its corresponding number.\n"
|
||||
|
||||
select option in Start Help Exit; do
|
||||
case $option in
|
||||
@ -114,3 +171,5 @@ select option in Start Help Exit; do
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
fQuit 0
|
||||
|
@ -3,7 +3,7 @@
|
||||
- removed from the arkenfox user.js
|
||||
- deprecated by Mozilla but listed in the arkenfox user.js in the past
|
||||
|
||||
Last updated: 19-November-2022
|
||||
Last updated: 5-December-2022
|
||||
|
||||
Instructions:
|
||||
- [optional] close Firefox and backup your profile
|
||||
@ -238,9 +238,13 @@
|
||||
|
||||
/* REMOVED */
|
||||
/* 103+ */
|
||||
'beacon.enabled',
|
||||
'browser.newtab.preload',
|
||||
'browser.newtabpage.activity-stream.feeds.discoverystreamfeed',
|
||||
'browser.newtabpage.activity-stream.feeds.snippets',
|
||||
'browser.region.network.url',
|
||||
'browser.region.update.enabled',
|
||||
'browser.search.region',
|
||||
'browser.ssl_override_behavior',
|
||||
'browser.tabs.warnOnClose',
|
||||
'devtools.chrome.enabled',
|
||||
|
@ -3,10 +3,10 @@ TITLE arkenfox user.js updater
|
||||
|
||||
REM ## arkenfox user.js updater for Windows
|
||||
REM ## author: @claustromaniac
|
||||
REM ## version: 4.17
|
||||
REM ## version: 4.18
|
||||
REM ## instructions: https://github.com/arkenfox/user.js/wiki/5.1-Updater-[Options]#-windows
|
||||
|
||||
SET v=4.17
|
||||
SET v=4.18
|
||||
|
||||
VERIFY ON
|
||||
CD /D "%~dp0"
|
||||
@ -178,8 +178,8 @@ IF EXIST user.js.new (
|
||||
MOVE /Y user.js user.js.bak >nul
|
||||
) ELSE (
|
||||
FOR /F "usebackq tokens=1,2 delims==" %%i IN (`wmic os get LocalDateTime /VALUE 2^>NUL`) DO IF '.%%i.'=='.LocalDateTime.' SET ldt=%%j
|
||||
SET ldt=%ldt:~0,8%_%ldt:~8,6%
|
||||
MOVE /Y user.js "user-backup-%ldt%.js" >nul
|
||||
SET ldt=!ldt:~0,8!_!ldt:~8,6!
|
||||
MOVE /Y user.js "user-backup-!ldt!.js" >nul
|
||||
)
|
||||
REN user.js.new user.js
|
||||
CALL :message "Update complete."
|
||||
|
39
user.js
39
user.js
@ -1,7 +1,7 @@
|
||||
/******
|
||||
* name: arkenfox user.js
|
||||
* date: 21 November 2022
|
||||
* version: 107
|
||||
* date: 9 January 2023
|
||||
* version: 108
|
||||
* url: https://github.com/arkenfox/user.js
|
||||
* license: MIT: https://github.com/arkenfox/user.js/blob/master/LICENSE.txt
|
||||
|
||||
@ -110,13 +110,6 @@ user_pref("geo.provider.ms-windows-location", false); // [WINDOWS]
|
||||
user_pref("geo.provider.use_corelocation", false); // [MAC]
|
||||
user_pref("geo.provider.use_gpsd", false); // [LINUX]
|
||||
user_pref("geo.provider.use_geoclue", false); // [FF102+] [LINUX]
|
||||
/* 0203: disable region updates
|
||||
* [1] https://firefox-source-docs.mozilla.org/toolkit/modules/toolkit_modules/Region.html ***/
|
||||
user_pref("browser.region.update.enabled", false); // [FF79+]
|
||||
// user_pref("browser.region.network.url", ""); // [FF78+] Defense-in-depth
|
||||
/* 0204: set search region
|
||||
* [NOTE] May not be hidden if Firefox has changed your settings due to your region (0203) ***/
|
||||
// user_pref("browser.search.region", "US"); // [HIDDEN PREF]
|
||||
/* 0210: set preferred language for displaying pages
|
||||
* [SETTING] General>Language and Appearance>Language>Choose your preferred language...
|
||||
* [TEST] https://addons.mozilla.org/about ***/
|
||||
@ -268,6 +261,7 @@ user_pref("_user.js.parrot", "0700 syntax error: the parrot's given up the ghost
|
||||
/* 0701: disable IPv6
|
||||
* IPv6 can be abused, especially with MAC addresses, and can leak with VPNs: assuming
|
||||
* your ISP and/or router and/or website is IPv6 capable. Most sites will fall back to IPv4
|
||||
* [SETUP-WEB] PR_CONNECT_RESET_ERROR: this pref *might* be the cause
|
||||
* [STATS] Firefox telemetry (Sept 2022) shows ~8% of successful connections are IPv6
|
||||
* [NOTE] This is an application level fallback. Disabling IPv6 is best done at an
|
||||
* OS/network level, and/or configured properly in VPN setups. If you are not masking your IP,
|
||||
@ -477,7 +471,7 @@ user_pref("security.OCSP.require", true);
|
||||
user_pref("security.family_safety.mode", 0);
|
||||
/* 1223: enable strict PKP (Public Key Pinning)
|
||||
* 0=disabled, 1=allow user MiTM (default; such as your antivirus), 2=strict
|
||||
* [SETUP-WEB] MOZILLA_PKIX_ERROR_KEY_PINNING_FAILURE: If you rely on an AV (antivirus) to protect
|
||||
* [SETUP-WEB] MOZILLA_PKIX_ERROR_KEY_PINNING_FAILURE
|
||||
* your web browsing by inspecting ALL your web traffic, then override to current default ***/
|
||||
user_pref("security.cert_pinning.enforcement_level", 2);
|
||||
/* 1224: enable CRLite [FF73+]
|
||||
@ -565,10 +559,8 @@ user_pref("privacy.userContext.ui.enabled", true);
|
||||
/*** [SECTION 2000]: PLUGINS / MEDIA / WEBRTC ***/
|
||||
user_pref("_user.js.parrot", "2000 syntax error: the parrot's snuffed it!");
|
||||
/* 2001: disable WebRTC (Web Real-Time Communication)
|
||||
* Firefox uses mDNS hostname obfuscation on desktop (except Windows7/8) and the
|
||||
* private IP is NEVER exposed, except if required in TRUSTED scenarios; i.e. after
|
||||
* you grant device (microphone or camera) access
|
||||
* [SETUP-HARDEN] Test first. Windows7/8 users only: behind a proxy who never use WebRTC
|
||||
* Firefox desktop uses mDNS hostname obfuscation and the private IP is never exposed until
|
||||
* required in TRUSTED scenarios; i.e. after you grant device (microphone or camera) access
|
||||
* [TEST] https://browserleaks.com/webrtc
|
||||
* [1] https://groups.google.com/g/discuss-webrtc/c/6stQXi72BEU/m/2FwZd24UAQAJ
|
||||
* [2] https://datatracker.ietf.org/doc/html/draft-ietf-mmusic-mdns-ice-candidates#section-3.1.1 ***/
|
||||
@ -603,7 +595,7 @@ user_pref("media.eme.enabled", false);
|
||||
user_pref("_user.js.parrot", "2400 syntax error: the parrot's kicked the bucket!");
|
||||
/* 2402: prevent scripts from moving and resizing open windows ***/
|
||||
user_pref("dom.disable_window_move_resize", true);
|
||||
/* 2404: limit events that can cause a popup [SETUP-WEB] ***/
|
||||
/* 2404: limit events that can cause a pop-up [SETUP-WEB] ***/
|
||||
user_pref("dom.popup_allowed_events", "click dblclick mousedown pointerdown");
|
||||
|
||||
/*** [SECTION 2600]: MISCELLANEOUS ***/
|
||||
@ -611,9 +603,6 @@ user_pref("_user.js.parrot", "2600 syntax error: the parrot's run down the curta
|
||||
/* 2601: prevent accessibility services from accessing your browser [RESTART]
|
||||
* [1] https://support.mozilla.org/kb/accessibility-services ***/
|
||||
user_pref("accessibility.force_disabled", 1);
|
||||
/* 2602: disable sending additional analytics to web servers
|
||||
* [1] https://developer.mozilla.org/docs/Web/API/Navigator/sendBeacon ***/
|
||||
user_pref("beacon.enabled", false);
|
||||
/* 2603: remove temp files opened with an external application
|
||||
* [1] https://bugzilla.mozilla.org/302433 ***/
|
||||
user_pref("browser.helperApps.deleteTempFileOnExit", true);
|
||||
@ -714,7 +703,7 @@ user_pref("browser.contentblocking.category", "strict");
|
||||
/* 2710: enable state partitioning of service workers [FF96+] ***/
|
||||
user_pref("privacy.partition.serviceWorkers", true); // [DEFAULT: true FF105+]
|
||||
/* 2720: enable APS (Always Partitioning Storage) ***/
|
||||
user_pref("privacy.partition.always_partition_third_party_non_cookie_storage", true); // [FF104+] [DEFAULT: true FF109+}
|
||||
user_pref("privacy.partition.always_partition_third_party_non_cookie_storage", true); // [FF104+] [DEFAULT: true FF109+]
|
||||
user_pref("privacy.partition.always_partition_third_party_non_cookie_storage.exempt_sessionstorage", false); // [FF105+] [DEFAULT: false FF109+]
|
||||
|
||||
/*** [SECTION 2800]: SHUTDOWN & SANITIZING ***/
|
||||
@ -829,6 +818,7 @@ user_pref("privacy.sanitize.timeSpan", 0);
|
||||
531915 - use fdlibm's sin, cos and tan in jsmath (FF93, ESR91.1)
|
||||
1756280 - enforce navigator.pdfViewerEnabled as true and plugins/mimeTypes as hard-coded values (FF100)
|
||||
1692609 - reduce JS timing precision to 16.67ms (previously FF55+ was 100ms) (FF102)
|
||||
1422237 - return "srgb" with color-gamut (FF110)
|
||||
***/
|
||||
user_pref("_user.js.parrot", "4500 syntax error: the parrot's popped 'is clogs");
|
||||
/* 4501: enable privacy.resistFingerprinting [FF41+]
|
||||
@ -1034,18 +1024,20 @@ user_pref("privacy.firstparty.isolate", false); // [DEFAULT: false]
|
||||
* In FF96+ these are listed in about:compat
|
||||
* [1] https://blog.mozilla.org/security/2021/03/23/introducing-smartblock/ ***/
|
||||
user_pref("extensions.webcompat.enable_shims", true); // [DEFAULT: true]
|
||||
/* 6010: enforce/reset TLS 1.0/1.1 downgrades to session only
|
||||
* [NOTE] In FF97+ the TLS 1.0/1.1 downgrade UX was removed
|
||||
/* 6010: enforce no TLS 1.0/1.1 downgrades
|
||||
* [TEST] https://tls-v1-1.badssl.com:1010/ ***/
|
||||
user_pref("security.tls.version.enable-deprecated", false); // [DEFAULT: false]
|
||||
/* 6011: enforce disabling of Web Compatibility Reporter [FF56+]
|
||||
* Web Compatibility Reporter adds a "Report Site Issue" button to send data to Mozilla
|
||||
* [WHY] To prevent wasting Mozilla's time with a custom setup ***/
|
||||
user_pref("extensions.webcompat-reporter.enabled", false); // [DEFAULT: false]
|
||||
/* 6050: prefsCleaner: reset items removed from arkenfox FF102+ ***/
|
||||
/* 6050: prefsCleaner: reset previously active items removed from arkenfox FF102+ ***/
|
||||
// user_pref("beacon.enabled", "");
|
||||
// user_pref("browser.newtab.preload", "");
|
||||
// user_pref("browser.newtabpage.activity-stream.feeds.discoverystreamfeed", "");
|
||||
// user_pref("browser.newtabpage.activity-stream.feeds.snippets", "");
|
||||
// user_pref("browser.region.network.url", "");
|
||||
// user_pref("browser.region.update.enabled", "");
|
||||
// user_pref("browser.ssl_override_behavior", "");
|
||||
// user_pref("devtools.chrome.enabled", "");
|
||||
// user_pref("dom.disable_beforeunload", "");
|
||||
@ -1194,6 +1186,9 @@ user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", fa
|
||||
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
|
||||
/* 9003: disable What's New toolbar icon [FF69+] ***/
|
||||
user_pref("browser.messaging-system.whatsNewPanel.enabled", false);
|
||||
/* 9004: disable seach terms [FF110+]
|
||||
* [SETTING] Search > SearchBar > Use the address bar for search and navigation > Show search terms instead of URL... ***/
|
||||
user_pref("browser.urlbar.showSearchTerms.enabled", false);
|
||||
|
||||
/*** [SECTION 9999]: DEPRECATED / REMOVED / LEGACY / RENAMED
|
||||
Documentation denoted as [-]. Items deprecated prior to FF91 have been archived at [1]
|
||||
|
Reference in New Issue
Block a user