Update prefsCleaner.bat
This commit is contained in:
parent
7cd2c650cb
commit
c0f9e6ab2b
@ -3,7 +3,7 @@ TITLE prefs.js cleaner
|
|||||||
|
|
||||||
REM ### prefs.js cleaner for Windows
|
REM ### prefs.js cleaner for Windows
|
||||||
REM ## author: @claustromaniac
|
REM ## author: @claustromaniac
|
||||||
REM ## version: 1.2
|
REM ## version: 1.1
|
||||||
|
|
||||||
SETLOCAL EnableDelayedExpansion
|
SETLOCAL EnableDelayedExpansion
|
||||||
:begin
|
:begin
|
||||||
@ -12,7 +12,7 @@ ECHO:
|
|||||||
ECHO ########################################
|
ECHO ########################################
|
||||||
ECHO #### prefs.js cleaner for Windows ####
|
ECHO #### prefs.js cleaner for Windows ####
|
||||||
ECHO #### author: @claustromaniac ####
|
ECHO #### author: @claustromaniac ####
|
||||||
ECHO #### version: 1.2 ####
|
ECHO #### version: 1.1 ####
|
||||||
ECHO ########################################
|
ECHO ########################################
|
||||||
ECHO:
|
ECHO:
|
||||||
CALL :message "This script should be run from your Firefox profile directory."
|
CALL :message "This script should be run from your Firefox profile directory."
|
||||||
@ -72,10 +72,8 @@ SETLOCAL DisableDelayedExpansion
|
|||||||
FOR /F "tokens=1,* delims=:" %%G IN ('FINDSTR /N "^" prefs.js') DO (
|
FOR /F "tokens=1,* delims=:" %%G IN ('FINDSTR /N "^" prefs.js') DO (
|
||||||
SET "_line=%%H"
|
SET "_line=%%H"
|
||||||
SETLOCAL EnableDelayedExpansion
|
SETLOCAL EnableDelayedExpansion
|
||||||
SET "_pref=!_line: =!"
|
IF /I "user_pref"=="!_line:~0,9!" (
|
||||||
SET "_pref=!_pref: =!"
|
FOR /F "delims=," %%X IN ("!_line!") DO (SET "_pref=%%X")
|
||||||
IF /I "user_pref"=="!_pref:~0,9!" (
|
|
||||||
FOR /F "delims=," %%X IN ("!_pref!") DO (SET "_pref=%%X")
|
|
||||||
SET _pref=!_pref:"=""!
|
SET _pref=!_pref:"=""!
|
||||||
FIND /I "!_pref!" user.js >nul
|
FIND /I "!_pref!" user.js >nul
|
||||||
IF ERRORLEVEL 1 (
|
IF ERRORLEVEL 1 (
|
||||||
|
Loading…
Reference in New Issue
Block a user