mirror of
				https://github.com/arkenfox/user.js.git
				synced 2025-11-04 07:45:26 +01:00 
			
		
		
		
	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:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user