mirror of
https://github.com/arkenfox/user.js.git
synced 2025-09-01 01:18:30 +02:00
Compare commits
84 Commits
55.0
...
v57.0-alph
Author | SHA1 | Date | |
---|---|---|---|
5743fe303c | |||
89e0aed652 | |||
59ae0b1028 | |||
69c278c3ba | |||
4290b4e882 | |||
efcaa3de8a | |||
cdeb0abe79 | |||
450adab519 | |||
500c129d48 | |||
7ae034a23c | |||
754ec610d1 | |||
fe752c8be3 | |||
da3ba2a97f | |||
22e51e2a08 | |||
c6d55296fb | |||
f89bb3f1c2 | |||
64a6eb794a | |||
fe46ea79ce | |||
d256908a5f | |||
dedfbf04b6 | |||
e080becba5 | |||
76bc2bce25 | |||
7f4a671b09 | |||
b373fe2a58 | |||
95f1d6ecf6 | |||
3028a7a61a | |||
06d9d61558 | |||
1dd683c81f | |||
2c56d90a6f | |||
df01fb87ce | |||
ce66da10a4 | |||
e1034faf1f | |||
d4cfd1e885 | |||
6cdfd1a443 | |||
ca16792723 | |||
6e2479dc0f | |||
bbb29237cc | |||
fec0c99287 | |||
258e8ff805 | |||
a74170e2b0 | |||
e29a301578 | |||
1031312f82 | |||
ddfdf7cb47 | |||
649e49e0fa | |||
908a8d66f4 | |||
4a91b866a4 | |||
0912b03f62 | |||
12f80bdf65 | |||
88216743a5 | |||
fa94f9b3c1 | |||
620a0ee29c | |||
a25df4c942 | |||
7fa0025baf | |||
80ac9dfa1f | |||
a93ce5d9f1 | |||
367972155a | |||
985c164cd0 | |||
f5ffeff971 | |||
31e7c72f64 | |||
2f6deda172 | |||
39594629e5 | |||
ca30ba4994 | |||
5338b6fb60 | |||
bdf0e5ed56 | |||
89474d014f | |||
c84a59fd95 | |||
598ee751f5 | |||
2e4e0a6327 | |||
4d35be7ccb | |||
f3bd095fe9 | |||
e794611920 | |||
f450c2172b | |||
6a7dac32cc | |||
6900924aa6 | |||
7c2be97879 | |||
5e414ff5cb | |||
13aa4a0290 | |||
76672ed767 | |||
a5ae7d17a3 | |||
54b64e3f3c | |||
17ba1401cf | |||
e09e5ab8db | |||
caed9d833c | |||
d9f76d3add |
1
scratchpad-scripts/test.js
Normal file
1
scratchpad-scripts/test.js
Normal file
@ -0,0 +1 @@
|
||||
// boo!
|
107
updater.bat
Normal file
107
updater.bat
Normal file
@ -0,0 +1,107 @@
|
||||
@ECHO OFF
|
||||
TITLE ghacks user.js updater
|
||||
|
||||
REM ### ghacks-user.js updater for Windows
|
||||
REM ## author: @claustromaniac
|
||||
REM ## version: 2.1
|
||||
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
SET "_ua="
|
||||
SET "_log="
|
||||
:parse
|
||||
IF "%~1"=="" GOTO endparse
|
||||
IF "%~1"=="-unattended" SET "_ua=true"
|
||||
IF "%~1"=="-log" SET "_log=true"
|
||||
SHIFT
|
||||
GOTO parse
|
||||
:endparse
|
||||
SET "_name="
|
||||
SET "_date="
|
||||
SET "_version="
|
||||
SET /A "_line=0"
|
||||
ECHO.
|
||||
IF EXIST user.js (
|
||||
FOR /F "delims=" %%i IN (user.js) DO (
|
||||
IF !_line! EQU 1 SET "_name=%%i"
|
||||
IF !_line! EQU 2 SET "_date=%%i"
|
||||
IF !_line! EQU 3 SET "_version=%%i"
|
||||
SET /A "_line+=1"
|
||||
IF !_line! GEQ 4 GOTO break
|
||||
)
|
||||
:break
|
||||
IF !_line! GEQ 4 (
|
||||
IF "ghacks"=="!_name:~8,6!" (
|
||||
FOR /F "delims=:" %%G IN ("!_version!") DO SET "_version=%%G"
|
||||
SET "_version=!_version:~2!"
|
||||
SET "_date=!_date:~8!"
|
||||
ECHO ghacks user.js !_version!, !_date!
|
||||
) ELSE ( ECHO Current user.js version not recognised. )
|
||||
) ELSE ( ECHO Current user.js version not recognised. )
|
||||
) ELSE ( ECHO user.js not detected in the current directory. )
|
||||
ECHO.
|
||||
IF NOT "%_ua%"=="true" (
|
||||
ECHO This batch should be run from your Firefox profile directory. It will download the latest version of ghacks user.js from github and then append any of your own changes from user-overrides.js to it.
|
||||
ECHO.
|
||||
REM ECHO Visit the wiki for more detailed information.
|
||||
REM ECHO.
|
||||
CHOICE /M "Continue"
|
||||
IF ERRORLEVEL 2 GOTO end
|
||||
)
|
||||
CLS
|
||||
ECHO.
|
||||
IF "%_log%"=="true" (
|
||||
CALL :log >>user.js-update-log.txt 2>&1
|
||||
EXIT /B
|
||||
:log
|
||||
ECHO ##################################################################
|
||||
ECHO.
|
||||
ECHO %date%, %time%
|
||||
ECHO.
|
||||
)
|
||||
IF EXIST user.js (
|
||||
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.
|
||||
)
|
||||
ECHO Retrieving latest user.js file from ghacks github repository...
|
||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/ghacksuserjs/ghacks-user.js/raw/master/user.js', 'user.js')" >nul
|
||||
ECHO.
|
||||
IF EXIST user.js (
|
||||
IF EXIST "user-overrides.js" (
|
||||
ECHO Appending user-overrides.js...
|
||||
ECHO.
|
||||
COPY /B /V /Y user.js+"user-overrides.js" "tempuserjs"
|
||||
DEL /F user.js
|
||||
REN tempuserjs user.js
|
||||
ECHO.
|
||||
)
|
||||
ECHO Handling backups...
|
||||
SET "changed="
|
||||
IF EXIST user.js.bak ( FC user.js.bak user.js >nul && SET "changed=false" || SET "changed=true" )
|
||||
ECHO.
|
||||
ECHO.
|
||||
IF "!changed!"=="true" (
|
||||
IF EXIST user.js.old.bak DEL /F user.js.old.bak
|
||||
ECHO Update complete.
|
||||
) ELSE (
|
||||
IF "!changed!"=="false" (
|
||||
DEL /F user.js.bak
|
||||
IF EXIST user.js.old.bak REN user.js.old.bak user.js.bak
|
||||
ECHO Update completed without changes.
|
||||
) ELSE ECHO Update complete.
|
||||
)
|
||||
ECHO.
|
||||
) ELSE (
|
||||
IF EXIST user.js.bak REN user.js.bak user.js
|
||||
IF EXIST user.js.old.bak REN user.js.old.bak user.js.bak
|
||||
ECHO.
|
||||
ECHO Update failed. Make sure PowerShell is allowed internet access.
|
||||
ECHO.
|
||||
ECHO No changes were made.
|
||||
ECHO.
|
||||
)
|
||||
IF NOT "%_log%"=="true" (
|
||||
IF NOT "%_ua%"=="true" PAUSE
|
||||
)
|
||||
:end
|
55
updater.sh
Normal file
55
updater.sh
Normal file
@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
|
||||
### ghacks-user.js updater for Mac/Linux
|
||||
## author: @overdodactyl
|
||||
## version: 1.1
|
||||
|
||||
ghacksjs="https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js"
|
||||
|
||||
echo -e "\nThis script should be run from your Firefox profile directory.\n"
|
||||
|
||||
currdir=$(pwd)
|
||||
|
||||
## get the full path of this script (greadlink for Mac, readlink for Linux)
|
||||
scriptfullpath=$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")
|
||||
|
||||
## change directory to the Firefox profile directory
|
||||
cd "$(dirname "${scriptfullpath}")"
|
||||
|
||||
echo -e "Updating the user.js for Firefox profile:\n$(pwd)\n"
|
||||
|
||||
if [ -e user.js ]; then
|
||||
echo "Your current user.js file for this profile will be backed up and the latest ghacks version from github will take its place."
|
||||
echo -e "\nIf currently using the ghacks user.js, please compare versions:"
|
||||
echo " Available online: $(curl -s ${ghacksjs} | sed -n '4p')"
|
||||
echo " Currently using: $(sed -n '4p' user.js)"
|
||||
else
|
||||
echo "A user.js file does not exist in this profile. If you continue, the latest ghacks version from github will be downloaded."
|
||||
fi
|
||||
|
||||
echo -e "\nIf a user-overrides.js file exists in this profile, it will be appended to the user.js.\n"
|
||||
|
||||
read -p "Continue Y/N? " -n 1 -r
|
||||
echo -e "\n\n"
|
||||
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
if [ -e user.js ]; then
|
||||
# backup current user.js
|
||||
bakfile="user.js.backup.$(date +"%Y-%m-%d_%H%M")"
|
||||
mv user.js "${bakfile}" && echo "Your previous user.js file was backed up: ${bakfile}"
|
||||
fi
|
||||
|
||||
# download latest ghacks user.js
|
||||
echo "downloading latest ghacks user.js file"
|
||||
curl -O ${ghacksjs} && echo "ghacks user.js has been downloaded"
|
||||
|
||||
if [ -e user-overrides.js ]; then
|
||||
echo "user-overrides.js file found"
|
||||
cat user-overrides.js >> user.js && echo "user-overrides.js has been appended to user.js"
|
||||
fi
|
||||
else
|
||||
echo "Process aborted"
|
||||
fi
|
||||
|
||||
## change directory back to the original working directory
|
||||
cd "${currdir}"
|
BIN
wikipiki/exceptions01.png
Normal file
BIN
wikipiki/exceptions01.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
BIN
wikipiki/exceptions02.png
Normal file
BIN
wikipiki/exceptions02.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
BIN
wikipiki/exceptions03.png
Normal file
BIN
wikipiki/exceptions03.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
Reference in New Issue
Block a user