mirror of
https://github.com/arkenfox/user.js.git
synced 2025-09-01 09:28:31 +02:00
Compare commits
93 Commits
Author | SHA1 | Date | |
---|---|---|---|
b8f3d93a5c | |||
f53f01823f | |||
18dbb56a3d | |||
cc8674c16d | |||
f394fd0290 | |||
f24899fcac | |||
a7ba61c0d4 | |||
babb9f3682 | |||
b22e349d44 | |||
bb48fe4ebe | |||
44a8088481 | |||
4c8c9bc01f | |||
3bb9fc713f | |||
b761a9dd32 | |||
0da2ecdb4d | |||
31e864c16c | |||
acc1376c37 | |||
939d75e5eb | |||
3b573bf9f0 | |||
a231c1e90e | |||
f229a3cb75 | |||
981462ee54 | |||
d940ffb3c6 | |||
a6d20eaf5b | |||
b93a5e334c | |||
c98606430c | |||
12c0631900 | |||
efcceaf2c3 | |||
9018577a3e | |||
6968b9a369 | |||
ada31d4f50 | |||
d973e11714 | |||
b6d7b2bff5 | |||
74f804a056 | |||
f0b5e3649d | |||
9cc132e69d | |||
9419e2faab | |||
0566ded651 | |||
ba9b3c217b | |||
79c5539edb | |||
cfd7cd01d1 | |||
da9f912862 | |||
9930cfbc07 | |||
7738e320d5 | |||
9b8735a87a | |||
6c10e03ce5 | |||
7ad3bb9e61 | |||
5dcf639d33 | |||
2da3b0192f | |||
ada8158caf | |||
2071939c5e | |||
f082278217 | |||
abe37add6e | |||
bc07ca94c0 | |||
728c962684 | |||
ca99add006 | |||
f771027138 | |||
8f1c0044b9 | |||
87cd828b5b | |||
46ccd9f654 | |||
b1927f9de1 | |||
b592e0e592 | |||
3b6cd93749 | |||
3a24c01f03 | |||
b7c80841a9 | |||
95645f59a3 | |||
9138e342fd | |||
692ed70ea9 | |||
3430507ae4 | |||
844f3ce9c8 | |||
03ffb90186 | |||
5f9bb59b95 | |||
7163efdd1e | |||
65fb24ff1b | |||
612cfbf313 | |||
4596d721e6 | |||
911206eed5 | |||
cb5cdca99d | |||
e54ae46537 | |||
7c978d4e70 | |||
d905b4387d | |||
c31c825a74 | |||
6505a9fefd | |||
de74f812ee | |||
82bb3f987d | |||
a35a616de7 | |||
ecf99bf9e7 | |||
cfaf354fe3 | |||
0b51e98d91 | |||
fa51251235 | |||
21fcd0bd35 | |||
96d558dd0c | |||
b6e8dcab81 |
@ -2,7 +2,7 @@
|
||||
|
||||
## prefs.js cleaner for Linux/Mac
|
||||
## author: @claustromaniac
|
||||
## version: 1.3
|
||||
## version: 1.4
|
||||
|
||||
## special thanks to @overdodactyl and @earthlng for a few snippets that I stol..*cough* borrowed from the updater.sh
|
||||
|
||||
@ -20,15 +20,22 @@ cd "$(dirname "${sfp}")"
|
||||
fQuit() {
|
||||
## change directory back to the original working directory
|
||||
cd "${currdir}"
|
||||
echo -e "\n$2"
|
||||
[ $1 -eq 0 ] && echo -e "\n$2" || echo -e "\n$2" >&2
|
||||
exit $1
|
||||
}
|
||||
|
||||
fUsage() {
|
||||
echo -e "\nUsage: $0 [-s]"
|
||||
echo -e "
|
||||
Optional Arguments:
|
||||
-s Start immediately"
|
||||
}
|
||||
|
||||
fFF_check() {
|
||||
# there are many ways to see if firefox is running or not, some more reliable than others
|
||||
# this isn't elegant and might not be future-proof but should at least be compatible with any environment
|
||||
while [ -e lock ]; do
|
||||
echo -e "\nThis Firefox profile seems to be in use. Close Firefox and try again.\n"
|
||||
echo -e "\nThis Firefox profile seems to be in use. Close Firefox and try again.\n" >&2
|
||||
read -p "Press any key to continue."
|
||||
done
|
||||
}
|
||||
@ -54,34 +61,42 @@ fClean() {
|
||||
done < "$1" > prefs.js
|
||||
}
|
||||
|
||||
fStart() {
|
||||
if [ ! -e user.js ]; then
|
||||
fQuit 1 "user.js not found in the current directory."
|
||||
elif [ ! -e prefs.js ]; then
|
||||
fQuit 1 "prefs.js not found in the current directory."
|
||||
fi
|
||||
|
||||
fFF_check
|
||||
bakfile="prefs.js.backup.$(date +"%Y-%m-%d_%H%M")"
|
||||
mv prefs.js "${bakfile}" || fQuit 1 "Operation aborted.\nReason: Could not create backup file $bakfile"
|
||||
echo -e "\nprefs.js backed up: $bakfile"
|
||||
echo "Cleaning prefs.js..."
|
||||
fClean "$bakfile"
|
||||
fQuit 0 "All done!"
|
||||
}
|
||||
|
||||
echo -e "\n\n"
|
||||
echo " ╔══════════════════════════╗"
|
||||
echo " ║ prefs.js cleaner ║"
|
||||
echo " ║ by claustromaniac ║"
|
||||
echo " ║ v1.3 ║"
|
||||
echo " ║ v1.4 ║"
|
||||
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"
|
||||
|
||||
[ "$1" == '-s' ] && fStart
|
||||
|
||||
select option in Start Help Exit; do
|
||||
case $option in
|
||||
Start)
|
||||
if [ ! -e user.js ]; then
|
||||
fQuit 1 "user.js not found in the current directory."
|
||||
elif [ ! -e prefs.js ]; then
|
||||
fQuit 1 "prefs.js not found in the current directory."
|
||||
fi
|
||||
|
||||
fFF_check
|
||||
bakfile="prefs.js.backup.$(date +"%Y-%m-%d_%H%M")"
|
||||
mv prefs.js "${bakfile}" || fQuit 1 "Operation aborted.\nReason: Could not create backup file $bakfile"
|
||||
echo -e "\nprefs.js backed up: $bakfile"
|
||||
echo "Cleaning prefs.js..."
|
||||
fClean "$bakfile"
|
||||
fQuit 0 "All done!"
|
||||
fStart
|
||||
;;
|
||||
Help)
|
||||
fUsage
|
||||
echo -e "\nThis script creates a backup of your prefs.js file before doing anything."
|
||||
echo -e "It should be safe, but you can follow these steps if something goes wrong:\n"
|
||||
echo "1. Make sure Firefox is closed."
|
||||
|
@ -1,16 +1,19 @@
|
||||
/***
|
||||
Version: up to and including FF/ESR78
|
||||
This will reset the preferences that are under sections 4600 & 4700 in the
|
||||
arkenfox user.js. These are the prefs that are no longer necessary, or they
|
||||
conflict with, privacy.resistFingerprinting if you have that enabled.
|
||||
|
||||
This will reset the preferences that are under sections 4600 & 4700 in the
|
||||
arkenfox user.js. These are the prefs that are no longer necessary, or they
|
||||
conflict with, privacy.resistFingerprinting if you have that enabled.
|
||||
Last updated: 08-July-2021
|
||||
|
||||
For instructions see:
|
||||
https://github.com/arkenfox/user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
||||
For instructions see:
|
||||
https://github.com/arkenfox/user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
||||
***/
|
||||
|
||||
(function() {
|
||||
let ops = [
|
||||
|
||||
(() => {
|
||||
|
||||
if ('undefined' === typeof(Services)) return alert('about:config needs to be the active tab!');
|
||||
|
||||
const aPREFS = [
|
||||
/* section 4600 */
|
||||
'dom.maxHardwareConcurrency',
|
||||
'dom.enable_resource_timing',
|
||||
@ -22,44 +25,45 @@
|
||||
'media.webspeech.synth.enabled',
|
||||
'media.video_stats.enabled',
|
||||
'dom.w3c_touch_events.enabled',
|
||||
'media.navigator.enabled',
|
||||
'media.ondevicechange.enabled',
|
||||
'webgl.enable-debug-renderer-info',
|
||||
'dom.w3c_pointer_events.enabled',
|
||||
'ui.prefersReducedMotion',
|
||||
'dom.w3c_pointer_events.enabled', // deprecated FF87
|
||||
'ui.use_standins_for_native_colors',
|
||||
'ui.systemUsesDarkTheme',
|
||||
'ui.prefersReducedMotion',
|
||||
'dom.webaudio.enabled',
|
||||
'layout.css.font-visibility.level',
|
||||
/* section 4700 */
|
||||
'general.useragent.override',
|
||||
'general.buildID.override',
|
||||
'general.appname.override',
|
||||
'general.appversion.override',
|
||||
'general.platform.override',
|
||||
'general.buildID.override',
|
||||
'general.oscpu.override',
|
||||
'general.platform.override',
|
||||
'general.useragent.override',
|
||||
/* reset parrot: check your open about:config after running the script */
|
||||
'_user.js.parrot'
|
||||
]
|
||||
];
|
||||
|
||||
console.clear();
|
||||
|
||||
if("undefined" === typeof(Services)) {
|
||||
alert("about:config needs to be the active tab!");
|
||||
return;
|
||||
}
|
||||
|
||||
let c = 0;
|
||||
for (let i = 0, len = ops.length; i < len; i++) {
|
||||
if (Services.prefs.prefHasUserValue(ops[i])) {
|
||||
Services.prefs.clearUserPref(ops[i]);
|
||||
if (!Services.prefs.prefHasUserValue(ops[i])) {
|
||||
console.log("reset", ops[i]);
|
||||
for (const sPname of aPREFS) {
|
||||
if (Services.prefs.prefHasUserValue(sPname)) {
|
||||
Services.prefs.clearUserPref(sPname);
|
||||
if (!Services.prefs.prefHasUserValue(sPname)) {
|
||||
console.info('reset', sPname);
|
||||
c++;
|
||||
} else { console.log("failed to reset", ops[i]); }
|
||||
} else console.warn('failed to reset', sPname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
focus();
|
||||
|
||||
let d = (c==1) ? " pref" : " prefs";
|
||||
if (c > 0) {
|
||||
alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
|
||||
} else { alert("nothing to reset"); }
|
||||
|
||||
|
||||
const d = (c==1) ? ' pref' : ' prefs';
|
||||
alert(c ? 'successfully reset ' + c + d + "\n\nfor details check the console" : 'nothing to reset');
|
||||
|
||||
return 'all done';
|
||||
|
||||
})();
|
||||
|
||||
|
@ -1,17 +1,20 @@
|
||||
/***
|
||||
Version: up to and including FF/ESR78
|
||||
Version: up to and including FF/ESR78
|
||||
|
||||
This will reset the preferences that have been deprecated by Mozilla
|
||||
and used in the arkenfox user.js
|
||||
This will reset the preferences that have been deprecated by Mozilla
|
||||
and used in the arkenfox user.js
|
||||
|
||||
It is in reverse order, so feel free to remove sections that do not apply
|
||||
It is in reverse order, so feel free to remove sections that do not apply
|
||||
|
||||
For instructions see:
|
||||
https://github.com/arkenfox/user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
||||
For instructions see:
|
||||
https://github.com/arkenfox/user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
||||
***/
|
||||
|
||||
(function() {
|
||||
let ops = [
|
||||
(() => {
|
||||
|
||||
if ('undefined' === typeof(Services)) return alert('about:config needs to be the active tab!');
|
||||
|
||||
const aPREFS = [
|
||||
/* deprecated */
|
||||
|
||||
/* 78 */
|
||||
@ -220,29 +223,26 @@
|
||||
|
||||
/* reset parrot: check your open about:config after running the script */
|
||||
'_user.js.parrot'
|
||||
]
|
||||
];
|
||||
|
||||
console.clear();
|
||||
|
||||
if("undefined" === typeof(Services)) {
|
||||
alert("about:config needs to be the active tab!");
|
||||
return;
|
||||
}
|
||||
|
||||
let c = 0;
|
||||
for (let i = 0, len = ops.length; i < len; i++) {
|
||||
if (Services.prefs.prefHasUserValue(ops[i])) {
|
||||
Services.prefs.clearUserPref(ops[i]);
|
||||
if (!Services.prefs.prefHasUserValue(ops[i])) {
|
||||
console.log("reset", ops[i]);
|
||||
for (const sPname of aPREFS) {
|
||||
if (Services.prefs.prefHasUserValue(sPname)) {
|
||||
Services.prefs.clearUserPref(sPname);
|
||||
if (!Services.prefs.prefHasUserValue(sPname)) {
|
||||
console.info('reset', sPname);
|
||||
c++;
|
||||
} else { console.log("failed to reset", ops[i]); }
|
||||
} else console.warn('failed to reset', sPname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
focus();
|
||||
|
||||
let d = (c==1) ? " pref" : " prefs";
|
||||
if (c > 0) {
|
||||
alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
|
||||
} else { alert("nothing to reset"); }
|
||||
|
||||
|
||||
const d = (c==1) ? ' pref' : ' prefs';
|
||||
alert(c ? 'successfully reset ' + c + d + "\n\nfor details check the console" : 'nothing to reset');
|
||||
|
||||
return 'all done';
|
||||
|
||||
})();
|
||||
|
@ -1,15 +1,18 @@
|
||||
/***
|
||||
This will reset the preferences that have been removed completely from the arkenfox user.js.
|
||||
This will reset the preferences that have been removed completely from the arkenfox user.js.
|
||||
|
||||
Last updated: 26-Jan-2021
|
||||
Last updated: 24-July-2021
|
||||
|
||||
For instructions see:
|
||||
https://github.com/arkenfox/user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
||||
For instructions see:
|
||||
https://github.com/arkenfox/user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
||||
***/
|
||||
|
||||
(function() {
|
||||
let ops = [
|
||||
/* removed in arkenfox user.js v52-57 */
|
||||
|
||||
(() => {
|
||||
|
||||
if ('undefined' === typeof(Services)) return alert('about:config needs to be the active tab!');
|
||||
|
||||
const aPREFS = [
|
||||
/* removed in arkenfox user.js */
|
||||
/* 52-alpha */
|
||||
'browser.search.reset.enabled',
|
||||
'browser.search.reset.whitelist',
|
||||
@ -26,7 +29,6 @@
|
||||
'extensions.pocket.api', // covered by extensions.pocket.enabled
|
||||
'extensions.pocket.oAuthConsumerKey', // ditto
|
||||
'extensions.pocket.site', // ditto
|
||||
/* 56-alpha: none */
|
||||
/* 57-alpha */
|
||||
'geo.wifi.xhr.timeout', // covered by geo.enabled
|
||||
'browser.search.geoip.timeout', // ditto
|
||||
@ -128,7 +130,6 @@
|
||||
'browser.cache.disk.smart_size.enabled',
|
||||
'browser.cache.disk.smart_size.first_run',
|
||||
'browser.cache.offline.insecure.enable',
|
||||
'browser.safebrowsing.downloads.remote.url',
|
||||
'browser.safebrowsing.provider.google.reportMalwareMistakeURL',
|
||||
'browser.safebrowsing.provider.google.reportPhishMistakeURL',
|
||||
'browser.safebrowsing.provider.google.reportURL',
|
||||
@ -179,7 +180,6 @@
|
||||
'browser.safebrowsing.provider.mozilla.updateURL',
|
||||
'browser.urlbar.userMadeSearchSuggestionsChoice',
|
||||
'privacy.trackingprotection.annotate_channels',
|
||||
'privacy.trackingprotection.enabled',
|
||||
'privacy.trackingprotection.lower_network_priority',
|
||||
'privacy.trackingprotection.pbmode.enabled',
|
||||
'services.blocklist.addons.collection',
|
||||
@ -231,34 +231,38 @@
|
||||
'security.ssl3.dhe_rsa_aes_256_sha',
|
||||
/* 84-beta */
|
||||
'browser.newtabpage.activity-stream.asrouter.providers.snippets',
|
||||
'layout.css.visited_links_enabled',
|
||||
/* 85-beta */
|
||||
'network.http.redirection-limit',
|
||||
/* 86-beta */
|
||||
'media.gmp-widevinecdm.visible',
|
||||
/* 87-beta */
|
||||
'browser.send_pings.require_same_host',
|
||||
/* 88-beta */
|
||||
'webgl.min_capability_mode',
|
||||
/* 89-beta */
|
||||
'security.ssl.enable_ocsp_stapling',
|
||||
/* reset parrot: check your open about:config after running the script */
|
||||
'_user.js.parrot'
|
||||
]
|
||||
];
|
||||
|
||||
console.clear();
|
||||
|
||||
if("undefined" === typeof(Services)) {
|
||||
alert("about:config needs to be the active tab!");
|
||||
return;
|
||||
}
|
||||
|
||||
let c = 0;
|
||||
for (let i = 0, len = ops.length; i < len; i++) {
|
||||
if (Services.prefs.prefHasUserValue(ops[i])) {
|
||||
Services.prefs.clearUserPref(ops[i]);
|
||||
if (!Services.prefs.prefHasUserValue(ops[i])) {
|
||||
console.log("reset", ops[i]);
|
||||
for (const sPname of aPREFS) {
|
||||
if (Services.prefs.prefHasUserValue(sPname)) {
|
||||
Services.prefs.clearUserPref(sPname);
|
||||
if (!Services.prefs.prefHasUserValue(sPname)) {
|
||||
console.info('reset', sPname);
|
||||
c++;
|
||||
} else { console.log("failed to reset", ops[i]); }
|
||||
} else console.warn('failed to reset', sPname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
focus();
|
||||
|
||||
let d = (c==1) ? " pref" : " prefs";
|
||||
if (c > 0) {
|
||||
alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
|
||||
} else { alert("nothing to reset"); }
|
||||
|
||||
|
||||
const d = (c==1) ? ' pref' : ' prefs';
|
||||
alert(c ? 'successfully reset ' + c + d + "\n\nfor details check the console" : 'nothing to reset');
|
||||
|
||||
return 'all done';
|
||||
|
||||
})();
|
||||
|
53
updater.sh
53
updater.sh
@ -2,7 +2,7 @@
|
||||
|
||||
## arkenfox user.js updater for macOS and Linux
|
||||
|
||||
## version: 2.9
|
||||
## version: 3.2
|
||||
## Author: Pat Johnson (@overdodactyl)
|
||||
## Additional contributors: @earthlng, @ema-pe, @claustromaniac
|
||||
|
||||
@ -103,7 +103,6 @@ Optional Arguments:
|
||||
# File Handling #
|
||||
#########################
|
||||
|
||||
# Download files
|
||||
download_file () { # expects URL as argument ($1)
|
||||
declare -r tf=$(mktemp)
|
||||
|
||||
@ -122,36 +121,33 @@ open_file () { # expects one argument: file_path
|
||||
|
||||
readIniFile () { # expects one argument: absolute path of profiles.ini
|
||||
declare -r inifile="$1"
|
||||
declare -r tfile=$(mktemp)
|
||||
|
||||
if [ $(grep '^\[Profile' "$inifile" | wc -l) == "1" ]; then ### only 1 profile found
|
||||
grep '^\[Profile' -A 4 "$inifile" | grep -v '^\[Profile' > $tfile
|
||||
# tempIni will contain: [ProfileX], Name=, IsRelative= and Path= (and Default= if present) of the only (if) or the selected (else) profile
|
||||
if [ $(grep -c '^\[Profile' "${inifile}") -eq "1" ]; then ### only 1 profile found
|
||||
tempIni="$(grep '^\[Profile' -A 4 "${inifile}")"
|
||||
else
|
||||
grep -E -v '^\[General\]|^StartWithLastProfile=|^IsRelative=' "$inifile"
|
||||
echo ''
|
||||
echo -e "Profiles found:\n––––––––––––––––––––––––––––––"
|
||||
## cmd-substitution to strip trailing newlines and in quotes to keep internal ones:
|
||||
echo "$(grep --color=never -E 'Default=[^1]|\[Profile[0-9]*\]|Name=|Path=|^$' "${inifile}")"
|
||||
echo '––––––––––––––––––––––––––––––'
|
||||
read -p 'Select the profile number ( 0 for Profile0, 1 for Profile1, etc ) : ' -r
|
||||
echo -e "\n"
|
||||
if [[ $REPLY =~ ^(0|[1-9][0-9]*)$ ]]; then
|
||||
grep '^\[Profile'${REPLY} -A 4 "$inifile" | grep -v '^\[Profile'${REPLY} > $tfile
|
||||
if [[ "$?" != "0" ]]; then
|
||||
echo "Profile${REPLY} does not exist!" && exit 1
|
||||
fi
|
||||
tempIni="$(grep "^\[Profile${REPLY}" -A 4 "${inifile}")" || {
|
||||
echo -e "${RED}Profile${REPLY} does not exist!${NC}" && exit 1
|
||||
}
|
||||
else
|
||||
echo "Invalid selection!" && exit 1
|
||||
echo -e "${RED}Invalid selection!${NC}" && exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
declare -r profpath=$(grep '^Path=' $tfile)
|
||||
declare -r pathisrel=$(grep '^IsRelative=' $tfile)
|
||||
# extracting 0 or 1 from the "IsRelative=" line
|
||||
declare -r pathisrel=$(sed -n 's/^IsRelative=\([01]\)$/\1/p' <<< "${tempIni}")
|
||||
|
||||
rm "$tfile"
|
||||
|
||||
# update global variable
|
||||
if [[ ${pathisrel#*=} == "1" ]]; then
|
||||
PROFILE_PATH="$(dirname "$inifile")/${profpath#*=}"
|
||||
else
|
||||
PROFILE_PATH="${profpath#*=}"
|
||||
fi
|
||||
# extracting only the path itself, excluding "Path="
|
||||
PROFILE_PATH=$(sed -n 's/^Path=\(.*\)$/\1/p' <<< "${tempIni}")
|
||||
# update global variable if path is relative
|
||||
[[ ${pathisrel} == "1" ]] && PROFILE_PATH="$(dirname "${inifile}")/${PROFILE_PATH}"
|
||||
}
|
||||
|
||||
getProfilePath () {
|
||||
@ -161,16 +157,14 @@ getProfilePath () {
|
||||
if [ "$PROFILE_PATH" = false ]; then
|
||||
PROFILE_PATH="$SCRIPT_DIR"
|
||||
elif [ "$PROFILE_PATH" = 'list' ]; then
|
||||
local ini=''
|
||||
if [[ -f "$f1" ]]; then
|
||||
ini="$f1"
|
||||
readIniFile "$f1" # updates PROFILE_PATH or exits on error
|
||||
elif [[ -f "$f2" ]]; then
|
||||
ini="$f2"
|
||||
readIniFile "$f2"
|
||||
else
|
||||
echo -e "${RED}Error: Sorry, -l is not supported for your OS${NC}"
|
||||
exit 1
|
||||
fi
|
||||
readIniFile "$ini" # updates PROFILE_PATH or exits on error
|
||||
#else
|
||||
# PROFILE_PATH already set by user with -p
|
||||
fi
|
||||
@ -191,9 +185,7 @@ get_updater_version () {
|
||||
# -d: New version will not be looked for and update will not occur
|
||||
# -u: Check for update, if available, execute without asking
|
||||
update_updater () {
|
||||
if [ $UPDATE = 'no' ]; then
|
||||
return 0 # User signified not to check for updates
|
||||
fi
|
||||
[ $UPDATE = 'no' ] && return 0 # User signified not to check for updates
|
||||
|
||||
declare -r tmpfile="$(download_file 'https://raw.githubusercontent.com/arkenfox/user.js/master/updater.sh')"
|
||||
[ -z "${tmpfile}" ] && echo -e "${RED}Error! Could not download updater.sh${NC}" && return 1 # check if download failed
|
||||
@ -214,7 +206,6 @@ update_updater () {
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
#########################
|
||||
# Update user.js #
|
||||
#########################
|
||||
@ -245,7 +236,7 @@ add_override () {
|
||||
}
|
||||
|
||||
remove_comments () { # expects 2 arguments: from-file and to-file
|
||||
sed -e 's/^[[:space:]]*\/\/.*$//' -e '/^\/\*/,/\*\//d' -e '/^[[:space:]]*$/d' -e 's/);[[:space:]]*\/\/.*/);/' "$1" > "$2"
|
||||
sed -e '/^\/\*.*\*\/[[:space:]]*$/d' -e '/^\/\*/,/\*\//d' -e 's|^[[:space:]]*//.*$||' -e '/^[[:space:]]*$/d' -e 's|);[[:space:]]*//.*|);|' "$1" > "$2"
|
||||
}
|
||||
|
||||
# Applies latest version of user.js and any custom overrides
|
||||
|
BIN
wikipiki/parseError.png
Normal file
BIN
wikipiki/parseError.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Reference in New Issue
Block a user