prefsCleaner.bat: add -unattended flag (#1616)
* prefsCleaner.bat: add -unattended flag Usage: prefsCleaner.bat -unattended Skips the prompt for user input and proceeds when -unattended is specified. If omitted, default behaviour is unchanged. --------- Signed-off-by: Keith Harrison <keithh@protonmail.com> Co-authored-by: earthlng <earthlng@users.noreply.github.com>
This commit is contained in:
parent
b99dd27de8
commit
8259191167
@ -3,17 +3,19 @@ TITLE prefs.js cleaner
|
|||||||
|
|
||||||
REM ### prefs.js cleaner for Windows
|
REM ### prefs.js cleaner for Windows
|
||||||
REM ## author: @claustromaniac
|
REM ## author: @claustromaniac
|
||||||
REM ## version: 2.5
|
REM ## version: 2.6
|
||||||
|
|
||||||
CD /D "%~dp0"
|
CD /D "%~dp0"
|
||||||
|
|
||||||
|
IF /I "%~1"=="-unattended" (SET _ua=1)
|
||||||
|
|
||||||
:begin
|
:begin
|
||||||
ECHO:
|
ECHO:
|
||||||
ECHO:
|
ECHO:
|
||||||
ECHO ########################################
|
ECHO ########################################
|
||||||
ECHO #### prefs.js cleaner for Windows ####
|
ECHO #### prefs.js cleaner for Windows ####
|
||||||
ECHO #### by claustromaniac ####
|
ECHO #### by claustromaniac ####
|
||||||
ECHO #### v2.5 ####
|
ECHO #### v2.6 ####
|
||||||
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."
|
||||||
@ -22,10 +24,13 @@ CALL :message "This will allow inactive preferences to be reset to their default
|
|||||||
ECHO This Firefox profile shouldn't be in use during the process.
|
ECHO This Firefox profile shouldn't be in use during the process.
|
||||||
CALL :message ""
|
CALL :message ""
|
||||||
TIMEOUT 1 /nobreak >nul
|
TIMEOUT 1 /nobreak >nul
|
||||||
CHOICE /C SHE /N /M "Start [S] Help [H] Exit [E]"
|
|
||||||
CLS
|
IF NOT DEFINED _ua (
|
||||||
IF ERRORLEVEL 3 (EXIT /B)
|
CHOICE /C SHE /N /M "Start [S] Help [H] Exit [E]"
|
||||||
IF ERRORLEVEL 2 (GOTO :showhelp)
|
CLS
|
||||||
|
IF ERRORLEVEL 3 (EXIT /B)
|
||||||
|
IF ERRORLEVEL 2 (GOTO :showhelp)
|
||||||
|
)
|
||||||
IF NOT EXIST "user.js" (CALL :abort "user.js not found in the current directory." 30)
|
IF NOT EXIST "user.js" (CALL :abort "user.js not found in the current directory." 30)
|
||||||
IF NOT EXIST "prefs.js" (CALL :abort "prefs.js not found in the current directory." 30)
|
IF NOT EXIST "prefs.js" (CALL :abort "prefs.js not found in the current directory." 30)
|
||||||
CALL :strlenCheck
|
CALL :strlenCheck
|
||||||
|
Loading…
x
Reference in New Issue
Block a user