Skip to content

Commit

Permalink
v1.1 regex fix (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
claustromaniac authored and earthlng committed Apr 25, 2018
1 parent 94f8646 commit 71adc43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prefsCleaner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]}@@"
Expand All @@ -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."
Expand Down

0 comments on commit 71adc43

Please sign in to comment.