mirror of
				https://github.com/arkenfox/user.js.git
				synced 2025-11-03 23:35:26 +01:00 
			
		
		
		
	actually working v2
This commit is contained in:
		@@ -33,7 +33,7 @@ COPY /B /V /Y prefs.js "prefs-backup-%date:/=-%_%_time::=.%.js"
 | 
				
			|||||||
CALL :message "Cleaning prefs.js..."
 | 
					CALL :message "Cleaning prefs.js..."
 | 
				
			||||||
CALL :cleanup
 | 
					CALL :cleanup
 | 
				
			||||||
CLS
 | 
					CLS
 | 
				
			||||||
CALL :message "All done^!"
 | 
					CALL :message "All done!"
 | 
				
			||||||
TIMEOUT 5 >nul
 | 
					TIMEOUT 5 >nul
 | 
				
			||||||
ENDLOCAL
 | 
					ENDLOCAL
 | 
				
			||||||
EXIT /B
 | 
					EXIT /B
 | 
				
			||||||
@@ -56,7 +56,7 @@ IF NOT ERRORLEVEL 1 (
 | 
				
			|||||||
	CLS
 | 
						CLS
 | 
				
			||||||
	CALL :message "Firefox is still running."
 | 
						CALL :message "Firefox is still running."
 | 
				
			||||||
	ECHO   If you're not currently using this profile you can continue, otherwise
 | 
						ECHO   If you're not currently using this profile you can continue, otherwise
 | 
				
			||||||
	CALL :message "close Firefox first^!"
 | 
						CALL :message "close Firefox first!"
 | 
				
			||||||
	ECHO:
 | 
						ECHO:
 | 
				
			||||||
	PAUSE
 | 
						PAUSE
 | 
				
			||||||
	CLS
 | 
						CLS
 | 
				
			||||||
@@ -67,10 +67,12 @@ GOTO :EOF
 | 
				
			|||||||
REM ######### Cleanup Function ##########
 | 
					REM ######### Cleanup Function ##########
 | 
				
			||||||
:cleanup
 | 
					:cleanup
 | 
				
			||||||
(
 | 
					(
 | 
				
			||||||
	FOR /F tokens^=2^ delims^=^'^" %%G IN ('FINDSTR /R /C:"^[^'\"]*user_pref[^;]*\)[ 	]*;" "user.js"') DO (SET "[%%G]=1")
 | 
						FOR /F tokens^=2^ delims^=^'^" %%G IN ('FINDSTR /R ^^[^^\^"^']*user_pref user.js') DO (
 | 
				
			||||||
 | 
							IF NOT ""=="%%G" (SET "[%%G]=1")
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
	FOR /F "tokens=1,* delims=:" %%G IN ('FINDSTR /N "^" prefs.js') DO (
 | 
						FOR /F "tokens=1,* delims=:" %%G IN ('FINDSTR /N "^" prefs.js') DO (
 | 
				
			||||||
		FOR /F tokens^=2^ delims^=^" %%I IN ("%%H") DO (
 | 
							FOR /F tokens^=1^,2^ delims^=^" %%I IN ("%%H") DO (
 | 
				
			||||||
			IF NOT DEFINED [%%I] (
 | 
								IF NOT DEFINED [%%J] (
 | 
				
			||||||
				ECHO:%%H
 | 
									ECHO:%%H
 | 
				
			||||||
			)
 | 
								)
 | 
				
			||||||
		)
 | 
							)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user