From fdac8fba6a59d05800dd5a4cd0605fec764136ae Mon Sep 17 00:00:00 2001 From: claustromaniac <20734810+claustromaniac@users.noreply.github.com> Date: Sun, 22 Apr 2018 01:34:48 +0000 Subject: [PATCH] Update prefsCleaner.bat --- prefsCleaner.bat | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/prefsCleaner.bat b/prefsCleaner.bat index b5ff0dc..91a81a5 100644 --- a/prefsCleaner.bat +++ b/prefsCleaner.bat @@ -65,18 +65,16 @@ IF NOT ERRORLEVEL 1 ( GOTO :EOF REM ######### Cleanup Function ########## :cleanup +FOR /F tokens^=2^ delims^=^'^" %%G IN ('FINDSTR /R /C:"^[^\"']*user_pref[ ]*\([ ]*[\"'][^\"']*[\"'][ ]*," user.js') DO ( + IF NOT ""=="%%G" (SET "[%%G]=1") +) ( - FOR /F tokens^=2^ delims^=^'^" %%G IN ('FINDSTR /R /C:"^[^\"']*user_pref[ ]*\([ ]*[\"'][^\"']*[\"'][ ]*," user.js') DO ( - IF NOT ""=="%%G" (SET "[%%G]=1") - ) FOR /F "tokens=1,* delims=:" %%G IN ('FINDSTR /N "^" prefs.js') DO ( IF ""=="%%H" ( ECHO: ) ELSE ( - FOR /F tokens^=1^,2^ delims^=^" %%I IN ("%%H") DO ( - IF NOT DEFINED [%%J] ( - ECHO:%%H - ) + FOR /F tokens^=1^,2^ delims^=^"^' %%I IN ("%%H") DO ( + IF NOT DEFINED [%%J] (ECHO:%%H) ) ) )