anchor.diff:  	ECHO.
   )
   IF EXIST user.js (
  -	IF EXIST user.js.bak (
  -		REN user.js.bak user.js.old.bak
  -	)
  +	IF EXIST user.js.bak REN user.js.bak user.js.old.bak
   	REN user.js user.js.bak
   	ECHO Current user.js file backed up.
   	ECHO.
  
positive.code: IF NOT DEFINED _log (
  	IF NOT DEFINED _ua PAUSE
  )
  :end
  IF DEFINED _logp (
  	START user.js-update-log.txt
  )
  EXIT /B
  
  REM Function section starts below here
  
  :mergeprefs
  FOR /F "tokens=* delims=" %%G IN (%~1) DO (
  	SET _pref=%%G
  	SET "_temp=!_pref: =!"
  	IF /I "user_pref"=="!_temp:~0,9!" (
  		FOR /F "delims=," %%S IN ("!_pref!") DO (
  			SET _pref=%%S
  		)
  		SET _pref=!_pref:"=""!
  		FIND /I "!_pref!" %~2 >nul 2>&1
  		IF ERRORLEVEL 1 (
  			FIND /I "!_pref!" %~1 >temp123
  			FOR /F "tokens=* delims=" %%X IN (temp123) DO (
  				SET _temp=%%X
  				SET "_temp=!_temp: =!"
  				IF /I "user_pref"=="!_temp:~0,9!" (
  					SET _pref=%%X
  				)
  			)
  			ECHO !_pref!>>%~2
  		)
  	) ELSE (
  		ECHO !_pref!>>%~2
  	)
  )
  DEL /F temp123 2>nul
  REM DEL /F %~1 2>nul
  GOTO EOF
  REM end of mergeprefs
  
  :EOF
  
negative.code: 	REM ECHO Visit the wiki for more detailed information.
  	REM ECHO.
  	CHOICE /M "Continue"
  	IF ERRORLEVEL 2 EXIT /B
  )
  CLS
  ECHO.
  IF DEFINED _log (
  	CALL :log >>user.js-update-log.txt 2>&1
  	IF DEFINED _logp (
  		START user.js-update-log.txt
  	)
  	EXIT /B
  	:log
  	ECHO ##################################################################
  