commit 71adc43d17f616d88dce7f0de912bc470ad306be
parent 94f86465e642eb2d4985499c9ec0324f965afaa5
Author: claustromaniac <20734810+claustromaniac@users.noreply.github.com>
Date: Wed, 25 Apr 2018 20:56:54 +0000
v1.1 regex fix (#409)
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/prefsCleaner.sh b/prefsCleaner.sh
@@ -2,7 +2,7 @@
## prefs.js cleaner for Linux/Mac
## author: @claustromaniac
-## version: 1.0
+## version: 1.1
## special thanks to @overdodactyl and @earthlng for a few snippets that I stol..*cough* borrowed from the updater.sh
@@ -36,7 +36,7 @@ fFF_check() {
fClean() {
# the magic happens here
prefs="@@"
- prefexp="user_pref[ ]*\([ ]*[\"']([^\"']*)[\"'][ ]*,"
+ prefexp="user_pref[ ]*\([ ]*[\"']([^\"']+)[\"'][ ]*,"
while read -r line; do
if [[ "$line" =~ $prefexp && $prefs != *"@@${BASH_REMATCH[1]}@@"* ]]; then
prefs="${prefs}${BASH_REMATCH[1]}@@"
@@ -58,7 +58,7 @@ echo -e "\n\n"
echo " ╔══════════════════════════╗"
echo " ║ prefs.js cleaner ║"
echo " ║ by claustromaniac ║"
-echo " ║ v1.0 ║"
+echo " ║ v1.1 ║"
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."