user.js

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 82591911670943e629f5bc0a83adb95b2e5909ed
parent b99dd27de828be13530ce2f48c9178d34f5f82ab
Author: Keith Harrison <keithh@protonmail.com>
Date:   Sun,  5 Feb 2023 14:06:49 +0000

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>
Diffstat:
MprefsCleaner.bat | 17+++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/prefsCleaner.bat b/prefsCleaner.bat @@ -3,17 +3,19 @@ TITLE prefs.js cleaner REM ### prefs.js cleaner for Windows REM ## author: @claustromaniac -REM ## version: 2.5 +REM ## version: 2.6 CD /D "%~dp0" +IF /I "%~1"=="-unattended" (SET _ua=1) + :begin ECHO: ECHO: ECHO ######################################## ECHO #### prefs.js cleaner for Windows #### ECHO #### by claustromaniac #### -ECHO #### v2.5 #### +ECHO #### v2.6 #### ECHO ######################################## ECHO: 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. CALL :message "" TIMEOUT 1 /nobreak >nul -CHOICE /C SHE /N /M "Start [S] Help [H] Exit [E]" -CLS -IF ERRORLEVEL 3 (EXIT /B) -IF ERRORLEVEL 2 (GOTO :showhelp) + +IF NOT DEFINED _ua ( + CHOICE /C SHE /N /M "Start [S] Help [H] Exit [E]" + 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 "prefs.js" (CALL :abort "prefs.js not found in the current directory." 30) CALL :strlenCheck