mirror of
https://github.com/arkenfox/user.js.git
synced 2025-09-01 17:38:30 +02:00
Compare commits
337 Commits
59.0
...
v66.0-beta
Author | SHA1 | Date | |
---|---|---|---|
bee47f33cd | |||
2fcec590b4 | |||
3c4b312cc7 | |||
0354895a2e | |||
462db2062c | |||
d9e24e5095 | |||
b1aa1f5619 | |||
a349662f69 | |||
28a7226235 | |||
97f08ad3cd | |||
68584a3397 | |||
8b4f45774a | |||
f8428dcc0a | |||
6d6cd5f410 | |||
eae8434853 | |||
2cff24f12e | |||
60be8be5ec | |||
981dd83c15 | |||
5c703f0262 | |||
de0ebbed21 | |||
e448015704 | |||
d3b1ed45ad | |||
ed140425ea | |||
3847f97f41 | |||
d81e8ae583 | |||
7a8381d894 | |||
649699ad22 | |||
1d5289dd94 | |||
74c8f294d6 | |||
a0508eccf6 | |||
25acd9f63e | |||
74a08114a8 | |||
71ffc661b2 | |||
e432a22693 | |||
f06c78f897 | |||
847eb80877 | |||
ec0e58099f | |||
e6eb473071 | |||
f1b892bc1c | |||
524b5f79dc | |||
24f2e1d982 | |||
c6060e5645 | |||
d0b8a08a4b | |||
f047fe93c0 | |||
6147fed61c | |||
54f79604da | |||
2f351fa5ce | |||
5dc3ea66cd | |||
d9a87b3ac4 | |||
95b75a065d | |||
8c96432eb8 | |||
1c09ec36e3 | |||
f1e6d164f7 | |||
3b90e6e592 | |||
45bd5ccc02 | |||
7bf5790f2b | |||
075d6fe6e4 | |||
4604cf0d4e | |||
b845f8fe3a | |||
96063027ba | |||
186fb1c9be | |||
ac4e764c37 | |||
5b0952f60a | |||
5bd5f6b28e | |||
55c2cacbce | |||
4badc42879 | |||
6946a01232 | |||
da80e39064 | |||
c1d6d81528 | |||
d5ece0f6f4 | |||
f6ea20a8b0 | |||
645492e82f | |||
15c68dc344 | |||
04b797f1aa | |||
e60abd6c44 | |||
d55b8176ad | |||
31adbba774 | |||
3c247a2c5b | |||
879f0abf28 | |||
d97d0ec0f5 | |||
3916e38681 | |||
51ac69874b | |||
2d956d04f3 | |||
9d6bfb650c | |||
ccdd4decf0 | |||
f0fbfd3086 | |||
88b747ef36 | |||
c6ebe36165 | |||
7684e83aba | |||
4f37975566 | |||
26b874bed7 | |||
61be5ae563 | |||
ef1e61ebcd | |||
205c48d9d3 | |||
0e1b0a4b6e | |||
778dc89bb6 | |||
23733097a9 | |||
71a2d393f3 | |||
74ebacc0dd | |||
45e3b3a0e0 | |||
8172f730d3 | |||
5c85e61bb4 | |||
0a67cdec8b | |||
b85668c2cd | |||
786839ffc1 | |||
8313f2e01a | |||
0a87c99a0e | |||
91fed43fc7 | |||
74f029566e | |||
571be93ae0 | |||
11b16c9c6d | |||
c4ec4dbc77 | |||
67998eb4af | |||
834857b564 | |||
25923f1acd | |||
85eaba2571 | |||
51237f6889 | |||
74e753d0c5 | |||
db56940422 | |||
400d764a93 | |||
f3e2bfa76d | |||
d4907faa8e | |||
62351bfbf5 | |||
b182946ae4 | |||
2ae3a3e4e1 | |||
0ff610c056 | |||
661a314e28 | |||
106f46d053 | |||
643cba63cf | |||
b5c5d8e9d1 | |||
36b90cd5e6 | |||
299a03663f | |||
13550d18a1 | |||
c12eb0fdc6 | |||
acbf881b1f | |||
7351e561c4 | |||
4e42bad6a1 | |||
b85e748b53 | |||
0cc4007eda | |||
3003f2dd85 | |||
ce48306a0d | |||
3423d39fa9 | |||
4834472107 | |||
f214e4bc4e | |||
8fd6061bcc | |||
92acb6b2f7 | |||
b6b9733afa | |||
89bc0bee16 | |||
f8fc465d0a | |||
58fa4e9b6d | |||
afee555045 | |||
5a36b4e016 | |||
7b3e6f5143 | |||
452c717502 | |||
661af196d9 | |||
39a30d710b | |||
8f10300c15 | |||
806d047729 | |||
0efebe3e83 | |||
49d9314b0a | |||
b4b5e3a068 | |||
29d832e350 | |||
68e44285c5 | |||
e8bfa93696 | |||
1abe1fd4df | |||
24f7847f73 | |||
56206f77ba | |||
587194ce84 | |||
7aac6d476a | |||
9e073ea5d5 | |||
732c438148 | |||
58931bc15d | |||
21b18cbe49 | |||
cbcd293e68 | |||
aacf5d4a0b | |||
ec5fb6e3a1 | |||
b2fc9bc266 | |||
ca1cc2001f | |||
f88af1dac6 | |||
1c6c5ea2ff | |||
2d316ceedd | |||
36c791c4bc | |||
ee213f2bab | |||
01a978e33a | |||
6717bc0674 | |||
11a94c7e32 | |||
b7c0e816a0 | |||
8b5547a973 | |||
f0c29cf8a6 | |||
e7a71143a8 | |||
9e342deaf2 | |||
109d4cf916 | |||
c805dd8b3b | |||
a89e8fc1e0 | |||
f2065a463c | |||
299489c701 | |||
50a578c32a | |||
7d417da5fd | |||
e6a13e5a93 | |||
9a46fafb53 | |||
6fb2f25e65 | |||
9e67f982ab | |||
5b6ed92da4 | |||
2969c6660f | |||
776e32c27f | |||
9e1c368cd9 | |||
572d16d5a5 | |||
29e2461cd1 | |||
f39112f914 | |||
0145ccfec3 | |||
c2c8e6227c | |||
ab404680df | |||
cfa2da8fea | |||
b3b3ae4660 | |||
c4d131aaf9 | |||
9c975b318a | |||
a1638868ea | |||
3806ccc68c | |||
06b69bb95a | |||
d8bfdaa058 | |||
03efb99754 | |||
b390d9787b | |||
2e908f38d2 | |||
f973422581 | |||
5bcbe56f4b | |||
833f816b99 | |||
5ccea3262f | |||
9611eac1cf | |||
43119694fb | |||
cbea3adc7e | |||
4813aa549b | |||
96706cf11e | |||
a81d013e45 | |||
857cbd8c24 | |||
c9543519c7 | |||
d34894e965 | |||
70abeda9d4 | |||
dceef9d1db | |||
9386fb5581 | |||
56acb4cff5 | |||
1eac4185d2 | |||
05021ac62e | |||
a2b5e1e7cf | |||
d9a1c83300 | |||
a4a9b9a675 | |||
c61e633236 | |||
8783ae9ce8 | |||
3264fbd9c3 | |||
b8b3a4f7ed | |||
7f1f9e124b | |||
9b1cf28e89 | |||
acc5a1c2df | |||
9a4032f4cd | |||
f113cf84c3 | |||
c92ece7960 | |||
3e5667fb34 | |||
2bf238f384 | |||
3edf7af85e | |||
4b8b2d81a0 | |||
fde8035332 | |||
01bd2a4f6d | |||
6d4b49d061 | |||
8e60f412e4 | |||
f60a87f97f | |||
449e32a8ca | |||
35a9d3d1e1 | |||
c66d1b08e7 | |||
0a63b6545d | |||
a8051b88e4 | |||
87ce12925d | |||
d6a7531c67 | |||
3a77e18ae8 | |||
a635ae5dfb | |||
02bac31e6a | |||
e5d23f6b40 | |||
5fc48a1027 | |||
de7a8650f7 | |||
9c7170fc26 | |||
9406f32194 | |||
33759ab604 | |||
f97c9a05a9 | |||
94abd71787 | |||
45f1dfa912 | |||
d6280d2d7a | |||
67360332ab | |||
b880c9da61 | |||
1b0c9f66d9 | |||
7eda26a1d0 | |||
b89e247263 | |||
35fd4e343c | |||
47cf0e1640 | |||
5e7258ba2d | |||
6e6a993494 | |||
772fa4e06e | |||
78dc31f6d6 | |||
459396ed5b | |||
88b08c79cd | |||
cf269c982b | |||
36c11cb5d4 | |||
517b8665c0 | |||
149aab6b1e | |||
c5a1a038d2 | |||
cd322f39a4 | |||
8f2b674910 | |||
7d65d8c173 | |||
8b6eec2b46 | |||
13164a2d0d | |||
c4a1583e99 | |||
d10c8598f7 | |||
40db113d07 | |||
041e14a4d5 | |||
e67fdc2ce4 | |||
75534b4e6c | |||
94c0665343 | |||
71adc43d17 | |||
94f86465e6 | |||
bb4bf835b0 | |||
b4f1b4dbbf | |||
f90c17f748 | |||
fdac8fba6a | |||
d055560f6f | |||
27f87240ec | |||
17d83c1a1a | |||
8fa3a9db6b | |||
b0fb59f735 | |||
64d08dd6bc | |||
824dec4f9e | |||
3d2b0703be | |||
e25137ce94 | |||
6ee25c2bf5 | |||
6309822d33 | |||
d04ff8457e | |||
c6e3c013e0 | |||
e373a0f6e1 | |||
acce871308 | |||
61e706641e | |||
1e5e2ca418 |
17
.gitattributes
vendored
17
.gitattributes
vendored
@ -1,14 +1,15 @@
|
|||||||
## * text=auto
|
* text=auto
|
||||||
|
|
||||||
*.js text=auto
|
*.js text
|
||||||
*.md text=auto
|
*.md text
|
||||||
*.yml text=auto
|
*.yml text
|
||||||
*.txt text=auto
|
*.txt text
|
||||||
*.sh text=auto
|
*.sh text
|
||||||
*.bat eol=crlf
|
## *.bat text eol=crlf
|
||||||
|
*.bat -text
|
||||||
|
|
||||||
*.png binary
|
*.png binary
|
||||||
|
|
||||||
.gitattributes export-ignore
|
.gitattributes export-ignore
|
||||||
*.yml export-ignore
|
*.yml export-ignore
|
||||||
wikipiki export-ignore
|
/wikipiki export-ignore
|
||||||
|
20
README.md
20
README.md
@ -1,21 +1,27 @@
|
|||||||
###  user.js
|
### ![][b] user.js
|
||||||
A `user.js` is a configuration file that can control hundreds of Firefox settings. For a more technical breakdown and explanation, you can read more on the [overview](https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.1-Overview) wiki page.
|
A `user.js` is a configuration file that can control hundreds of Firefox settings. For a more technical breakdown and explanation, you can read more on the [overview](https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.1-Overview) wiki page.
|
||||||
|
|
||||||
###  ghacks user.js
|
### ![][b] ghacks user.js
|
||||||
The `ghacks user.js` is a **template**, which, as provided, aims to provide as much privacy and enhanced security as possible, and to reduce tracking and fingerprinting as much as possible - while minimizing any loss of functionality and breakage (but it will happen).
|
The `ghacks user.js` is a **template** which aims to provide as much privacy and enhanced security as possible, and to reduce tracking and fingerprinting as much as possible - while minimizing any loss of functionality and breakage (but it will happen).
|
||||||
|
|
||||||
Everyone, experts included, should at least read the [implementation](https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.3-Implementation) wiki page, as it contains important information regarding a few `ghacks user.js` settings.
|
Everyone, experts included, should at least read the [implementation](https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.3-Implementation) wiki page, as it contains important information regarding a few `ghacks user.js` settings.
|
||||||
|
|
||||||
|
Note that we do *not* recommend connecting over Tor on Firefox. Use the [Tor Browser](https://www.torproject.org/projects/torbrowser.html.en) if your [threat model](https://www.torproject.org/about/torusers.html.en) calls for it, or for accessing hidden services.
|
||||||
|
|
||||||
|
Also be aware that this `user.js` is made specifically for Firefox. Using it as-is in other Gecko-based browsers can be counterproductive, especially in the Tor Browser.
|
||||||
|
|
||||||
Sitemap: [Releases](https://github.com/ghacksuserjs/ghacks-user.js/releases), [changelogs](https://github.com/ghacksuserjs/ghacks-user.js/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Achangelog), [Wiki](https://github.com/ghacksuserjs/ghacks-user.js/wiki), [stickies](https://github.com/ghacksuserjs/ghacks-user.js/issues?q=is%3Aissue+is%3Aopen+label%3A%22sticky+topic%22). [diffs](https://github.com/ghacksuserjs/ghacks-user.js/issues?q=is%3Aissue+label%3Adiffs)
|
Sitemap: [Releases](https://github.com/ghacksuserjs/ghacks-user.js/releases), [changelogs](https://github.com/ghacksuserjs/ghacks-user.js/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Achangelog), [Wiki](https://github.com/ghacksuserjs/ghacks-user.js/wiki), [stickies](https://github.com/ghacksuserjs/ghacks-user.js/issues?q=is%3Aissue+is%3Aopen+label%3A%22sticky+topic%22). [diffs](https://github.com/ghacksuserjs/ghacks-user.js/issues?q=is%3Aissue+label%3Adiffs)
|
||||||
|
|
||||||
###  acknowledgments
|
### ![][b] acknowledgments
|
||||||
Literally thousands of sources, references and suggestions. That said...
|
Literally thousands of sources, references and suggestions. That said...
|
||||||
|
|
||||||
* Martin Brinkmann at [ghacks](https://www.ghacks.net/) <sup>1</sup>
|
* Martin Brinkmann at [ghacks](https://www.ghacks.net/) <sup>1</sup>
|
||||||
* The ghacks community and commentators
|
* The ghacks community and commentators
|
||||||
* [12bytes](http://12bytes.org/tech/firefox/firefoxgecko-configuration-guide-for-privacy-and-performance-buffs)
|
* [12bytes](https://12bytes.org/articles/tech/firefox/firefoxgecko-configuration-guide-for-privacy-and-performance-buffs)
|
||||||
* The 12bytes article now uses this user.js and supplements it with an additonal JS hosted right [here](https://github.com/atomGit/Firefox-user.js) at github
|
* The 12bytes article now uses this user.js and supplements it with an additional JS hosted at [GitLab](https://gitlab.com/labwrat/Firefox-user.js/tree/master)
|
||||||
|
|
||||||
<sup>1</sup> The ghacks user.js was an independent project by [Thorin-Oakenpants](https://github.com/Thorin-Oakenpants) started in early 2015 and was [first published](https://www.ghacks.net/2015/08/18/a-comprehensive-list-of-firefox-privacy-and-security-settings/) at ghacks in August 2015. With Martin Brinkmann's blessing, it will keep the ghacks name.
|
<sup>1</sup> The ghacks user.js was an independent project by [Thorin-Oakenpants](https://github.com/Thorin-Oakenpants) started in early 2015 and was [first published](https://www.ghacks.net/2015/08/18/a-comprehensive-list-of-firefox-privacy-and-security-settings/) at ghacks in August 2015. With Martin Brinkmann's blessing, it will keep the ghacks name.
|
||||||
|
|
||||||
###  [](https://opensource.org/licenses/MIT)
|
### ![][b] [](https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
|
[b]: /wikipiki/bullet01.png
|
||||||
|
@ -1 +1,3 @@
|
|||||||
theme: jekyll-theme-midnight
|
theme: jekyll-theme-midnight
|
||||||
|
title: ghacks-user.js
|
||||||
|
description: An ongoing comprehensive user.js template for configuring and hardening Firefox privacy, security and anti-fingerprinting
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF & SETLOCAL DisableDelayedExpansion
|
||||||
TITLE prefs.js cleaner
|
TITLE prefs.js cleaner
|
||||||
|
|
||||||
REM ### prefs.js cleaner for Windows
|
REM ### prefs.js cleaner for Windows
|
||||||
REM ## author: @claustromaniac
|
REM ## author: @claustromaniac
|
||||||
REM ## version: 1.2
|
REM ## version: 2.2
|
||||||
|
|
||||||
|
CD /D "%~dp0"
|
||||||
|
|
||||||
SETLOCAL EnableDelayedExpansion
|
|
||||||
:begin
|
:begin
|
||||||
ECHO:
|
ECHO:
|
||||||
ECHO:
|
ECHO:
|
||||||
ECHO ########################################
|
ECHO ########################################
|
||||||
ECHO #### prefs.js cleaner for Windows ####
|
ECHO #### prefs.js cleaner for Windows ####
|
||||||
ECHO #### by claustromaniac ####
|
ECHO #### by claustromaniac ####
|
||||||
ECHO #### v1.2 ####
|
ECHO #### v2.2 ####
|
||||||
ECHO ########################################
|
ECHO ########################################
|
||||||
ECHO:
|
ECHO:
|
||||||
CALL :message "This script should be run from your Firefox profile directory."
|
CALL :message "This script should be run from your Firefox profile directory."
|
||||||
@ -29,12 +30,13 @@ IF NOT EXIST "user.js" (CALL :abort "user.js not found in the current directory.
|
|||||||
IF NOT EXIST "prefs.js" (CALL :abort "prefs.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 :FFcheck
|
CALL :FFcheck
|
||||||
CALL :message "Backing up prefs.js..."
|
CALL :message "Backing up prefs.js..."
|
||||||
COPY /B /V /Y prefs.js "prefs-backup-!date:/=-!_!time::=.!.js"
|
SET "_time=%time: =0%"
|
||||||
|
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
|
CALL :message "All done!"
|
||||||
CALL :message "All done^!"
|
|
||||||
TIMEOUT 5 >nul
|
TIMEOUT 5 >nul
|
||||||
|
ENDLOCAL
|
||||||
EXIT /B
|
EXIT /B
|
||||||
|
|
||||||
REM ########## Abort Function ###########
|
REM ########## Abort Function ###########
|
||||||
@ -44,11 +46,9 @@ TIMEOUT %~2 >nul
|
|||||||
EXIT
|
EXIT
|
||||||
REM ########## Message Function #########
|
REM ########## Message Function #########
|
||||||
:message
|
:message
|
||||||
SETLOCAL DisableDelayedExpansion
|
|
||||||
ECHO:
|
ECHO:
|
||||||
ECHO: %~1
|
ECHO: %~1
|
||||||
ECHO:
|
ECHO:
|
||||||
ENDLOCAL
|
|
||||||
GOTO :EOF
|
GOTO :EOF
|
||||||
REM ####### Firefox Check Function ######
|
REM ####### Firefox Check Function ######
|
||||||
:FFcheck
|
:FFcheck
|
||||||
@ -57,7 +57,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,23 +67,20 @@ IF NOT ERRORLEVEL 1 (
|
|||||||
GOTO :EOF
|
GOTO :EOF
|
||||||
REM ######### Cleanup Function ##########
|
REM ######### Cleanup Function ##########
|
||||||
:cleanup
|
:cleanup
|
||||||
SETLOCAL DisableDelayedExpansion
|
FOR /F tokens^=2^ delims^=^'^" %%G IN ('FINDSTR /R /C:"^[^\"']*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 (
|
||||||
SET "_line=%%H"
|
IF ""=="%%H" (
|
||||||
SETLOCAL EnableDelayedExpansion
|
ECHO:
|
||||||
IF /I "user_pref"=="!_line:~0,9!" (
|
|
||||||
FOR /F tokens^=2^ delims^=^" %%I IN ("!_line:.=\.!") DO (
|
|
||||||
FINDSTR /R /C:"user_pref[ ]*\([ ]*[\"']%%I[\"'][ ]*," user.js >nul
|
|
||||||
IF ERRORLEVEL 1 (ECHO:!_line!)
|
|
||||||
)
|
|
||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO:!_line!
|
FOR /F tokens^=1^,2^ delims^=^"^' %%I IN ("%%H") DO (
|
||||||
|
IF NOT DEFINED [%%J] (ECHO:%%H)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
ENDLOCAL
|
|
||||||
)
|
)
|
||||||
)>tempcleanedprefs
|
)>tempcleanedprefs
|
||||||
ENDLOCAL
|
|
||||||
MOVE /Y tempcleanedprefs prefs.js
|
MOVE /Y tempcleanedprefs prefs.js
|
||||||
GOTO :EOF
|
GOTO :EOF
|
||||||
REM ############### Help ##################
|
REM ############### Help ##################
|
||||||
|
99
prefsCleaner.sh
Normal file
99
prefsCleaner.sh
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## prefs.js cleaner for Linux/Mac
|
||||||
|
## author: @claustromaniac
|
||||||
|
## version: 1.1
|
||||||
|
|
||||||
|
## special thanks to @overdodactyl and @earthlng for a few snippets that I stol..*cough* borrowed from the updater.sh
|
||||||
|
|
||||||
|
currdir=$(pwd)
|
||||||
|
|
||||||
|
## get the full path of this script (readlink for Linux, greadlink for Mac with coreutils installed)
|
||||||
|
sfp=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)
|
||||||
|
|
||||||
|
## fallback for Macs without coreutils
|
||||||
|
if [ -z "$sfp" ]; then sfp=${BASH_SOURCE[0]}; fi
|
||||||
|
|
||||||
|
## change directory to the Firefox profile directory
|
||||||
|
cd "$(dirname "${sfp}")"
|
||||||
|
|
||||||
|
fQuit() {
|
||||||
|
## change directory back to the original working directory
|
||||||
|
cd "${currdir}"
|
||||||
|
echo -e "\n$2"
|
||||||
|
exit $1
|
||||||
|
}
|
||||||
|
|
||||||
|
fFF_check() {
|
||||||
|
# there are many ways to see if firefox is running or not, some more reliable than others
|
||||||
|
# this isn't elegant and might not be future-proof but should at least be compatible with any environment
|
||||||
|
while [ -e webappsstore.sqlite-shm ]; do
|
||||||
|
echo -e "\nThis Firefox profile seems to be in use. Close Firefox and try again.\n"
|
||||||
|
read -p "Press any key to continue."
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
fClean() {
|
||||||
|
# the magic happens here
|
||||||
|
prefs="@@"
|
||||||
|
prefexp="user_pref[ ]*\([ ]*[\"']([^\"']+)[\"'][ ]*,"
|
||||||
|
while read -r line; do
|
||||||
|
if [[ "$line" =~ $prefexp && $prefs != *"@@${BASH_REMATCH[1]}@@"* ]]; then
|
||||||
|
prefs="${prefs}${BASH_REMATCH[1]}@@"
|
||||||
|
fi
|
||||||
|
done <<< "`grep -E \"$prefexp\" user.js`"
|
||||||
|
|
||||||
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
||||||
|
if [[ "$line" =~ ^$prefexp ]]; then
|
||||||
|
if [[ $prefs != *"@@${BASH_REMATCH[1]}@@"* ]]; then
|
||||||
|
echo "$line"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$line"
|
||||||
|
fi
|
||||||
|
done < "$1" > prefs.js
|
||||||
|
}
|
||||||
|
|
||||||
|
echo -e "\n\n"
|
||||||
|
echo " ╔══════════════════════════╗"
|
||||||
|
echo " ║ prefs.js cleaner ║"
|
||||||
|
echo " ║ by claustromaniac ║"
|
||||||
|
echo " ║ v1.1 ║"
|
||||||
|
echo " ╚══════════════════════════╝"
|
||||||
|
echo -e "\nThis script should be run from your Firefox profile directory.\n"
|
||||||
|
echo "It will remove any entries from prefs.js that also exist in user.js."
|
||||||
|
echo "This will allow inactive preferences to be reset to their default values."
|
||||||
|
echo -e "\nThis Firefox profile shouldn't be in use during the process.\n"
|
||||||
|
select option in Start Help Exit; do
|
||||||
|
case $option in
|
||||||
|
Start)
|
||||||
|
if [ ! -e user.js ]; then
|
||||||
|
fQuit 1 "user.js not found in the current directory."
|
||||||
|
elif [ ! -e prefs.js ]; then
|
||||||
|
fQuit 1 "prefs.js not found in the current directory."
|
||||||
|
fi
|
||||||
|
|
||||||
|
fFF_check
|
||||||
|
bakfile="prefs.js.backup.$(date +"%Y-%m-%d_%H%M")"
|
||||||
|
mv prefs.js "${bakfile}" || fQuit 1 "Operation aborted.\nReason: Could not create backup file $bakfile"
|
||||||
|
echo -e "\nprefs.js backed up: $bakfile"
|
||||||
|
echo "Cleaning prefs.js..."
|
||||||
|
fClean "$bakfile"
|
||||||
|
fQuit 0 "All done!"
|
||||||
|
;;
|
||||||
|
Help)
|
||||||
|
echo -e "\nThis script creates a backup of your prefs.js file before doing anything."
|
||||||
|
echo -e "It should be safe, but you can follow these steps if something goes wrong:\n"
|
||||||
|
echo "1. Make sure Firefox is closed."
|
||||||
|
echo "2. Delete prefs.js in your profile folder."
|
||||||
|
echo "3. Delete Invalidprefs.js if you have one in the same folder."
|
||||||
|
echo "4. Rename or copy your latest backup to prefs.js."
|
||||||
|
echo "5. Run Firefox and see if you notice anything wrong with it."
|
||||||
|
echo "6. If you do notice something wrong, especially with your extensions, and/or with the UI, go to about:support, and restart Firefox with add-ons disabled. Then, restart it again normally, and see if the problems were solved."
|
||||||
|
echo -e "If you are able to identify the cause of your issues, please bring it up on ghacks-user.js GitHub repository.\n"
|
||||||
|
;;
|
||||||
|
Exit)
|
||||||
|
fQuit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
@ -1,61 +0,0 @@
|
|||||||
/***
|
|
||||||
|
|
||||||
For instructions see:
|
|
||||||
https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
|
||||||
|
|
||||||
***/
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
let ops = [
|
|
||||||
/* --- 57-alpha --- */
|
|
||||||
/* commented out */
|
|
||||||
'browser.storageManager.enabled',
|
|
||||||
'dom.storageManager.enabled',
|
|
||||||
/* removed from the user.js */
|
|
||||||
'browser.search.geoip.timeout',
|
|
||||||
'geo.wifi.xhr.timeout',
|
|
||||||
'gfx.layerscope.enabled',
|
|
||||||
'media.webspeech.recognition.enable',
|
|
||||||
/* moved to RFP ALTERNATIVES */
|
|
||||||
'dom.w3c_touch_events.enabled',
|
|
||||||
'media.video_stats.enabled',
|
|
||||||
/* moved to DEPRECATED/REMOVED */
|
|
||||||
'browser.bookmarks.showRecentlyBookmarked',
|
|
||||||
'browser.casting.enabled',
|
|
||||||
'devtools.webide.autoinstallFxdtAdapters',
|
|
||||||
'media.eme.chromium-api.enabled',
|
|
||||||
'social.directories',
|
|
||||||
'social.enabled',
|
|
||||||
'social.remote-install.enabled',
|
|
||||||
'social.share.activationPanelEnabled',
|
|
||||||
'social.shareDirectory',
|
|
||||||
'social.toast-notifications.enabled',
|
|
||||||
'social.whitelist',
|
|
||||||
/* reset parrot: check your open about:config after running the script */
|
|
||||||
'_user.js.parrot'
|
|
||||||
]
|
|
||||||
|
|
||||||
if("undefined" === typeof(Services)) {
|
|
||||||
alert("about:config needs to be the active tab!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let c = 0;
|
|
||||||
for (let i = 0, len = ops.length; i < len; i++) {
|
|
||||||
if (Services.prefs.prefHasUserValue(ops[i])) {
|
|
||||||
Services.prefs.clearUserPref(ops[i]);
|
|
||||||
if (!Services.prefs.prefHasUserValue(ops[i])) {
|
|
||||||
console.log("reset", ops[i]);
|
|
||||||
c++;
|
|
||||||
} else { console.log("failed to reset", ops[i]); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
focus();
|
|
||||||
|
|
||||||
let d = (c==1) ? " pref" : " prefs";
|
|
||||||
if (c > 0) {
|
|
||||||
alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
|
|
||||||
} else { alert("nothing to reset"); }
|
|
||||||
|
|
||||||
})();
|
|
@ -1,12 +1,10 @@
|
|||||||
/***
|
/***
|
||||||
|
|
||||||
This will reset the preferences that are under sections 4600 & 4700 in the ghacks user.js
|
This will reset the preferences that are under sections 4600 & 4700 in the ghacks user.js
|
||||||
up to and including release 57-alpha. These are the prefs that are no longer necessary,
|
up to and including release 60-beta. These are the prefs that are no longer necessary,
|
||||||
or they conlfict with, privacy.resistFingerprinting if you have that enabled.
|
or they conflict with, privacy.resistFingerprinting if you have that enabled.
|
||||||
|
|
||||||
For instructions see:
|
For instructions see:
|
||||||
https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
||||||
|
|
||||||
***/
|
***/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
@ -20,9 +18,10 @@
|
|||||||
'dom.gamepad.enabled',
|
'dom.gamepad.enabled',
|
||||||
'dom.netinfo.enabled',
|
'dom.netinfo.enabled',
|
||||||
'media.webspeech.synth.enabled',
|
'media.webspeech.synth.enabled',
|
||||||
'geo.enabled',
|
|
||||||
'media.video_stats.enabled',
|
'media.video_stats.enabled',
|
||||||
'dom.w3c_touch_events.enabled',
|
'dom.w3c_touch_events.enabled',
|
||||||
|
'media.ondevicechange.enabled',
|
||||||
|
'webgl.enable-debug-renderer-info',
|
||||||
/* section 4700 */
|
/* section 4700 */
|
||||||
'general.useragent.override',
|
'general.useragent.override',
|
||||||
'general.buildID.override',
|
'general.buildID.override',
|
@ -1,21 +1,43 @@
|
|||||||
/***
|
/***
|
||||||
|
|
||||||
This will reset the preferences that have been deprecated by Mozilla
|
This will reset the preferences that have been deprecated by Mozilla
|
||||||
and used in the ghacks user.js up to and including release 57-alpha
|
and used in the ghacks user.js up to and including release 60-beta
|
||||||
|
|
||||||
It is in reverse order, so feel free to remove sections that do not apply
|
It is in reverse order, so feel free to remove sections that do not apply
|
||||||
|
|
||||||
For instructions see:
|
For instructions see:
|
||||||
https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
||||||
|
|
||||||
***/
|
***/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
let ops = [
|
let ops = [
|
||||||
/* deprecated */
|
/* deprecated */
|
||||||
|
|
||||||
/* ESR52.x users can remove sections 53-57 but it is not
|
/* ESR52.x users can remove sections 53-60 but it is not
|
||||||
crucial as your user.js will reinstate them */
|
crucial as your user.js will reinstate them */
|
||||||
|
/* 60 */
|
||||||
|
'browser.newtabpage.directory.source',
|
||||||
|
'browser.newtabpage.enhanced',
|
||||||
|
'browser.newtabpage.introShown',
|
||||||
|
'extensions.shield-recipe-client.enabled',
|
||||||
|
'extensions.shield-recipe-client.api_url',
|
||||||
|
'browser.newtabpage.activity-stream.enabled',
|
||||||
|
'dom.workers.enabled',
|
||||||
|
'view_source.tab',
|
||||||
|
/* 59 */
|
||||||
|
'intl.locale.matchOS',
|
||||||
|
'general.useragent.locale',
|
||||||
|
'datareporting.healthreport.about.reportUrl',
|
||||||
|
'dom.flyweb.enabled',
|
||||||
|
'security.mixed_content.use_hsts',
|
||||||
|
'security.mixed_content.send_hsts_priming',
|
||||||
|
'network.http.referer.userControlPolicy',
|
||||||
|
'security.xpconnect.plugin.unrestricted',
|
||||||
|
'media.getusermedia.screensharing.allowed_domains',
|
||||||
|
'camera.control.face_detection.enabled',
|
||||||
|
'dom.disable_window_status_change',
|
||||||
|
'dom.idle-observers-api.enabled',
|
||||||
|
/* 58 */
|
||||||
|
'browser.crashReports.unsubmittedCheck.autoSubmit',
|
||||||
/* 57 */
|
/* 57 */
|
||||||
'social.whitelist',
|
'social.whitelist',
|
||||||
'social.toast-notifications.enabled',
|
'social.toast-notifications.enabled',
|
150
scratchpad-scripts/ghacks-clear-[removed].js
Normal file
150
scratchpad-scripts/ghacks-clear-[removed].js
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
/***
|
||||||
|
This will reset the preferences that have been removed completely from the ghacks user.js.
|
||||||
|
|
||||||
|
Last updated: 30-Jan-2019
|
||||||
|
|
||||||
|
For instructions see:
|
||||||
|
https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
||||||
|
***/
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
let ops = [
|
||||||
|
/* removed in ghacks user.js v52-57 */
|
||||||
|
/* 52-alpha */
|
||||||
|
'browser.search.reset.enabled',
|
||||||
|
'browser.search.reset.whitelist',
|
||||||
|
/* 54-alpha */
|
||||||
|
'browser.migrate.automigrate.enabled',
|
||||||
|
'services.sync.enabled',
|
||||||
|
'webextensions.storage.sync.enabled',
|
||||||
|
'webextensions.storage.sync.serverURL',
|
||||||
|
/* 55-alpha */
|
||||||
|
'dom.keyboardevent.dispatch_during_composition', // default is false anyway
|
||||||
|
'dom.vr.oculus.enabled', // covered by dom.vr.enabled
|
||||||
|
'dom.vr.openvr.enabled', // ditto
|
||||||
|
'dom.vr.osvr.enabled', // ditto
|
||||||
|
'extensions.pocket.api', // covered by extensions.pocket.enabled
|
||||||
|
'extensions.pocket.oAuthConsumerKey', // ditto
|
||||||
|
'extensions.pocket.site', // ditto
|
||||||
|
/* 56-alpha: none */
|
||||||
|
/* 57-alpha */
|
||||||
|
'geo.wifi.xhr.timeout', // covered by geo.enabled
|
||||||
|
'browser.search.geoip.timeout', // ditto
|
||||||
|
'media.webspeech.recognition.enable', // default is false anyway
|
||||||
|
'gfx.layerscope.enabled', // default is false anyway
|
||||||
|
/* 58-alpha */
|
||||||
|
// excluding these e10 settings
|
||||||
|
// 'browser.tabs.remote.autostart',
|
||||||
|
// 'browser.tabs.remote.autostart.2',
|
||||||
|
// 'browser.tabs.remote.force-enable',
|
||||||
|
// 'browser.tabs.remote.separateFileUriProcess',
|
||||||
|
// 'extensions.e10sBlocksEnabling',
|
||||||
|
// 'extensions.webextensions.remote',
|
||||||
|
// 'dom.ipc.processCount',
|
||||||
|
// 'dom.ipc.shims.enabledWarnings',
|
||||||
|
// 'dom.ipc.processCount.extension',
|
||||||
|
// 'dom.ipc.processCount.file',
|
||||||
|
// 'security.sandbox.content.level',
|
||||||
|
// 'dom.ipc.plugins.sandbox-level.default',
|
||||||
|
// 'dom.ipc.plugins.sandbox-level.flash',
|
||||||
|
// 'security.sandbox.logging.enabled',
|
||||||
|
'dom.presentation.controller.enabled',
|
||||||
|
'dom.presentation.discoverable',
|
||||||
|
'dom.presentation.discovery.enabled',
|
||||||
|
'dom.presentation.enabled',
|
||||||
|
'dom.presentation.receiver.enabled',
|
||||||
|
'dom.presentation.session_transport.data_channel.enable',
|
||||||
|
/* 59-alpha */
|
||||||
|
'browser.stopReloadAnimation.enabled',
|
||||||
|
'browser.tabs.insertRelatedAfterCurrent',
|
||||||
|
'browser.tabs.loadDivertedInBackground',
|
||||||
|
'browser.tabs.loadInBackground',
|
||||||
|
'browser.tabs.selectOwnerOnClose',
|
||||||
|
'browser.urlbar.clickSelectsAll',
|
||||||
|
'browser.urlbar.doubleClickSelectsAll',
|
||||||
|
'media.flac.enabled',
|
||||||
|
'media.mediasource.enabled',
|
||||||
|
'media.mediasource.mp4.enabled',
|
||||||
|
'media.mediasource.webm.audio.enabled',
|
||||||
|
'media.mediasource.webm.enabled',
|
||||||
|
'media.mp4.enabled',
|
||||||
|
'media.ogg.enabled',
|
||||||
|
'media.ogg.flac.enabled',
|
||||||
|
'media.opus.enabled',
|
||||||
|
'media.raw.enabled',
|
||||||
|
'media.wave.enabled',
|
||||||
|
'media.webm.enabled',
|
||||||
|
'media.wmf.amd.vp9.enabled',
|
||||||
|
'media.wmf.enabled',
|
||||||
|
'media.wmf.vp9.enabled',
|
||||||
|
'ui.submenuDelay',
|
||||||
|
/* 60-beta - these were all at default anyway */
|
||||||
|
'device.storage.enabled',
|
||||||
|
'general.useragent.compatMode.firefox',
|
||||||
|
'network.dns.blockDotOnion',
|
||||||
|
'network.stricttransportsecurity.preloadlist',
|
||||||
|
'security.block_script_with_wrong_mime',
|
||||||
|
'security.fileuri.strict_origin_policy',
|
||||||
|
'security.sri.enable',
|
||||||
|
/* 61-beta */
|
||||||
|
'browser.laterrun.enabled',
|
||||||
|
'browser.offline-apps.notify',
|
||||||
|
'browser.rights.3.shown',
|
||||||
|
'browser.slowStartup.maxSamples',
|
||||||
|
'browser.slowStartup.notificationDisabled',
|
||||||
|
'browser.slowStartup.samples',
|
||||||
|
'browser.storageManager.enabled',
|
||||||
|
'dom.allow_scripts_to_close_windows',
|
||||||
|
'dom.disable_window_flip',
|
||||||
|
'network.http.fast-fallback-to-IPv4',
|
||||||
|
'offline-apps.quota.warn',
|
||||||
|
'services.blocklist.signing.enforced',
|
||||||
|
/* 62-beta */
|
||||||
|
'browser.urlbar.autoFill.typed',
|
||||||
|
'security.tls.version.fallback-limit',
|
||||||
|
/* 63-beta */
|
||||||
|
'extensions.webextensions.keepStorageOnUninstall',
|
||||||
|
'extensions.webextensions.keepUuidOnUninstall',
|
||||||
|
'privacy.trackingprotection.ui.enabled',
|
||||||
|
/* 64-beta */
|
||||||
|
'browser.eme.ui.enabled',
|
||||||
|
'browser.sessionstore.max_windows_undo',
|
||||||
|
'network.auth.subresource-img-cross-origin-http-auth-allow',
|
||||||
|
'media.peerconnection.ice.tcp',
|
||||||
|
'media.peerconnection.identity.enabled',
|
||||||
|
'media.peerconnection.identity.timeout',
|
||||||
|
'media.peerconnection.turn.disable',
|
||||||
|
'media.peerconnection.use_document_iceservers',
|
||||||
|
'media.peerconnection.video.enabled',
|
||||||
|
'media.navigator.video.enabled',
|
||||||
|
/* 65-beta */
|
||||||
|
'browser.contentblocking.enabled',
|
||||||
|
'browser.urlbar.maxHistoricalSearchSuggestions',
|
||||||
|
/* reset parrot: check your open about:config after running the script */
|
||||||
|
'_user.js.parrot'
|
||||||
|
]
|
||||||
|
|
||||||
|
if("undefined" === typeof(Services)) {
|
||||||
|
alert("about:config needs to be the active tab!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let c = 0;
|
||||||
|
for (let i = 0, len = ops.length; i < len; i++) {
|
||||||
|
if (Services.prefs.prefHasUserValue(ops[i])) {
|
||||||
|
Services.prefs.clearUserPref(ops[i]);
|
||||||
|
if (!Services.prefs.prefHasUserValue(ops[i])) {
|
||||||
|
console.log("reset", ops[i]);
|
||||||
|
c++;
|
||||||
|
} else { console.log("failed to reset", ops[i]); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
focus();
|
||||||
|
|
||||||
|
let d = (c==1) ? " pref" : " prefs";
|
||||||
|
if (c > 0) {
|
||||||
|
alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
|
||||||
|
} else { alert("nothing to reset"); }
|
||||||
|
|
||||||
|
})();
|
@ -1,63 +0,0 @@
|
|||||||
/***
|
|
||||||
|
|
||||||
This will reset the preferences that have been removed completely
|
|
||||||
from the ghacks user.js up to and including release 57-alpha
|
|
||||||
|
|
||||||
For instructions see:
|
|
||||||
https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
|
||||||
|
|
||||||
***/
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
let ops = [
|
|
||||||
/* removed in ghacks user.js v52-57 */
|
|
||||||
/* 52-alpha */
|
|
||||||
'browser.search.reset.enabled',
|
|
||||||
'browser.search.reset.whitelist',
|
|
||||||
/* 54-alpha */
|
|
||||||
'browser.migrate.automigrate.enabled',
|
|
||||||
'services.sync.enabled',
|
|
||||||
'webextensions.storage.sync.enabled',
|
|
||||||
'webextensions.storage.sync.serverURL',
|
|
||||||
/* 55-alpha */
|
|
||||||
'dom.keyboardevent.dispatch_during_composition', // default is false anyway
|
|
||||||
'dom.vr.oculus.enabled', // covered by dom.vr.enabled
|
|
||||||
'dom.vr.openvr.enabled', // ditto
|
|
||||||
'dom.vr.osvr.enabled', // ditto
|
|
||||||
'extensions.pocket.api', // covered by extensions.pocket.enabled
|
|
||||||
'extensions.pocket.oAuthConsumerKey', // ditto
|
|
||||||
'extensions.pocket.site', // ditto
|
|
||||||
/* 56-alpha: none */
|
|
||||||
/* 57-alpha */
|
|
||||||
'geo.wifi.xhr.timeout', // covered by geo.enabled
|
|
||||||
'browser.search.geoip.timeout', // ditto
|
|
||||||
'media.webspeech.recognition.enable', // default is false anyway
|
|
||||||
'gfx.layerscope.enabled', // default is false anyway
|
|
||||||
/* reset parrot: check your open about:config after running the script */
|
|
||||||
'_user.js.parrot'
|
|
||||||
]
|
|
||||||
|
|
||||||
if("undefined" === typeof(Services)) {
|
|
||||||
alert("about:config needs to be the active tab!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let c = 0;
|
|
||||||
for (let i = 0, len = ops.length; i < len; i++) {
|
|
||||||
if (Services.prefs.prefHasUserValue(ops[i])) {
|
|
||||||
Services.prefs.clearUserPref(ops[i]);
|
|
||||||
if (!Services.prefs.prefHasUserValue(ops[i])) {
|
|
||||||
console.log("reset", ops[i]);
|
|
||||||
c++;
|
|
||||||
} else { console.log("failed to reset", ops[i]); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
focus();
|
|
||||||
|
|
||||||
let d = (c==1) ? " pref" : " prefs";
|
|
||||||
if (c > 0) {
|
|
||||||
alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
|
|
||||||
} else { alert("nothing to reset"); }
|
|
||||||
|
|
||||||
})();
|
|
@ -1,409 +0,0 @@
|
|||||||
/***
|
|
||||||
|
|
||||||
This will reset EVERYTHING that is ACTIVE in the ghacks user.js
|
|
||||||
release 57-alpha master, but excludes the following:
|
|
||||||
- prefs removed since publishing on github
|
|
||||||
- e10s section 1100
|
|
||||||
- privacy.resistFingerprinting alternatives sections 4600 & 4700
|
|
||||||
- deprecated section 9999
|
|
||||||
|
|
||||||
It does not matter if you clear everything, as a restart will reapply your user.js
|
|
||||||
Total 477 prefs from 57-alpha master: 118 inactive, 359 active
|
|
||||||
These have been broken into two scripts for convenience
|
|
||||||
|
|
||||||
For instructions see:
|
|
||||||
https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
|
||||||
|
|
||||||
***/
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
let ops = [
|
|
||||||
/* 359 ACTIVE prefs in 57-alpha master */
|
|
||||||
'accessibility.force_disabled',
|
|
||||||
'alerts.showFavicons',
|
|
||||||
'app.update.auto',
|
|
||||||
'app.update.service.enabled',
|
|
||||||
'app.update.silent',
|
|
||||||
'app.update.staging.enabled',
|
|
||||||
'beacon.enabled',
|
|
||||||
'breakpad.reportURL',
|
|
||||||
'browser.aboutHomeSnippets.updateUrl',
|
|
||||||
'browser.backspace_action',
|
|
||||||
'browser.bookmarks.max_backups',
|
|
||||||
'browser.cache.disk.capacity',
|
|
||||||
'browser.cache.disk.enable',
|
|
||||||
'browser.cache.disk.smart_size.enabled',
|
|
||||||
'browser.cache.disk.smart_size.first_run',
|
|
||||||
'browser.cache.disk_cache_ssl',
|
|
||||||
'browser.cache.frecency_experiment',
|
|
||||||
'browser.cache.offline.enable',
|
|
||||||
'browser.crashReports.unsubmittedCheck.autoSubmit',
|
|
||||||
'browser.crashReports.unsubmittedCheck.enabled',
|
|
||||||
'browser.ctrlTab.previews',
|
|
||||||
'browser.display.use_document_fonts',
|
|
||||||
'browser.download.folderList',
|
|
||||||
'browser.download.forbid_open_with',
|
|
||||||
'browser.download.hide_plugins_without_extensions',
|
|
||||||
'browser.download.manager.addToRecentDocs',
|
|
||||||
'browser.download.useDownloadDir',
|
|
||||||
'browser.eme.ui.enabled',
|
|
||||||
'browser.fixup.alternate.enabled',
|
|
||||||
'browser.fixup.hide_user_pass',
|
|
||||||
'browser.formfill.enable',
|
|
||||||
'browser.helperApps.deleteTempFileOnExit',
|
|
||||||
'browser.laterrun.enabled',
|
|
||||||
'browser.library.activity-stream.enabled',
|
|
||||||
'browser.link.open_newwindow',
|
|
||||||
'browser.link.open_newwindow.restriction',
|
|
||||||
'browser.newtab.preload',
|
|
||||||
'browser.newtabpage.activity-stream.enabled',
|
|
||||||
'browser.newtabpage.directory.source',
|
|
||||||
'browser.newtabpage.enabled',
|
|
||||||
'browser.newtabpage.enhanced',
|
|
||||||
'browser.newtabpage.introShown',
|
|
||||||
'browser.offline-apps.notify',
|
|
||||||
'browser.onboarding.enabled',
|
|
||||||
'browser.pagethumbnails.capturing_disabled',
|
|
||||||
'browser.ping-centre.telemetry',
|
|
||||||
'browser.rights.3.shown',
|
|
||||||
'browser.safebrowsing.downloads.remote.enabled',
|
|
||||||
'browser.safebrowsing.downloads.remote.url',
|
|
||||||
'browser.safebrowsing.provider.google.reportMalwareMistakeURL',
|
|
||||||
'browser.safebrowsing.provider.google.reportPhishMistakeURL',
|
|
||||||
'browser.safebrowsing.provider.google.reportURL',
|
|
||||||
'browser.safebrowsing.provider.google4.reportMalwareMistakeURL',
|
|
||||||
'browser.safebrowsing.provider.google4.reportPhishMistakeURL',
|
|
||||||
'browser.safebrowsing.provider.google4.reportURL',
|
|
||||||
'browser.safebrowsing.reportPhishURL',
|
|
||||||
'browser.search.countryCode',
|
|
||||||
'browser.search.geoip.url',
|
|
||||||
'browser.search.geoSpecificDefaults',
|
|
||||||
'browser.search.geoSpecificDefaults.url',
|
|
||||||
'browser.search.region',
|
|
||||||
'browser.search.suggest.enabled',
|
|
||||||
'browser.search.update',
|
|
||||||
'browser.send_pings',
|
|
||||||
'browser.send_pings.require_same_host',
|
|
||||||
'browser.sessionhistory.max_entries',
|
|
||||||
'browser.sessionstore.interval',
|
|
||||||
'browser.sessionstore.max_tabs_undo',
|
|
||||||
'browser.sessionstore.max_windows_undo',
|
|
||||||
'browser.sessionstore.privacy_level',
|
|
||||||
'browser.sessionstore.resume_from_crash',
|
|
||||||
'browser.shell.checkDefaultBrowser',
|
|
||||||
'browser.shell.shortcutFavicons',
|
|
||||||
'browser.slowStartup.maxSamples',
|
|
||||||
'browser.slowStartup.notificationDisabled',
|
|
||||||
'browser.slowStartup.samples',
|
|
||||||
'browser.ssl_override_behavior',
|
|
||||||
'browser.startup.homepage_override.mstone',
|
|
||||||
'browser.tabs.closeWindowWithLastTab',
|
|
||||||
'browser.tabs.crashReporting.sendReport',
|
|
||||||
'browser.tabs.insertRelatedAfterCurrent',
|
|
||||||
'browser.tabs.loadDivertedInBackground',
|
|
||||||
'browser.tabs.loadInBackground',
|
|
||||||
'browser.tabs.selectOwnerOnClose',
|
|
||||||
'browser.tabs.warnOnClose',
|
|
||||||
'browser.tabs.warnOnCloseOtherTabs',
|
|
||||||
'browser.tabs.warnOnOpen',
|
|
||||||
'browser.taskbar.lists.enabled',
|
|
||||||
'browser.taskbar.lists.frequent.enabled',
|
|
||||||
'browser.taskbar.lists.recent.enabled',
|
|
||||||
'browser.taskbar.lists.tasks.enabled',
|
|
||||||
'browser.taskbar.previews.enable',
|
|
||||||
'browser.uitour.enabled',
|
|
||||||
'browser.uitour.url',
|
|
||||||
'browser.urlbar.autoFill',
|
|
||||||
'browser.urlbar.autoFill.typed',
|
|
||||||
'browser.urlbar.clickSelectsAll',
|
|
||||||
'browser.urlbar.decodeURLsOnCopy',
|
|
||||||
'browser.urlbar.doubleClickSelectsAll',
|
|
||||||
'browser.urlbar.filter.javascript',
|
|
||||||
'browser.urlbar.maxHistoricalSearchSuggestions',
|
|
||||||
'browser.urlbar.oneOffSearches',
|
|
||||||
'browser.urlbar.speculativeConnect.enabled',
|
|
||||||
// 'browser.urlbar.suggest.bookmark', // this may not get reset by your user.js - see issue #308
|
|
||||||
// 'browser.urlbar.suggest.history', // ditto
|
|
||||||
// 'browser.urlbar.suggest.openpage', // ditto
|
|
||||||
'browser.urlbar.suggest.searches',
|
|
||||||
'browser.urlbar.trimURLs',
|
|
||||||
'browser.urlbar.usepreloadedtopurls.enabled',
|
|
||||||
'browser.urlbar.userMadeSearchSuggestionsChoice',
|
|
||||||
'browser.xul.error_pages.expert_bad_cert',
|
|
||||||
'camera.control.face_detection.enabled',
|
|
||||||
'canvas.capturestream.enabled',
|
|
||||||
'captivedetect.canonicalURL',
|
|
||||||
'datareporting.healthreport.about.reportUrl',
|
|
||||||
'datareporting.healthreport.uploadEnabled',
|
|
||||||
'datareporting.policy.dataSubmissionEnabled',
|
|
||||||
'device.storage.enabled',
|
|
||||||
'devtools.chrome.enabled',
|
|
||||||
'devtools.debugger.remote-enabled',
|
|
||||||
'devtools.webide.autoinstallADBHelper',
|
|
||||||
'devtools.webide.enabled',
|
|
||||||
'dom.allow_cut_copy',
|
|
||||||
'dom.allow_scripts_to_close_windows',
|
|
||||||
'dom.caches.enabled',
|
|
||||||
'dom.disable_beforeunload',
|
|
||||||
'dom.disable_window_flip',
|
|
||||||
'dom.disable_window_move_resize',
|
|
||||||
'dom.disable_window_open_feature.close',
|
|
||||||
'dom.disable_window_open_feature.location',
|
|
||||||
'dom.disable_window_open_feature.menubar',
|
|
||||||
'dom.disable_window_open_feature.minimizable',
|
|
||||||
'dom.disable_window_open_feature.personalbar',
|
|
||||||
'dom.disable_window_open_feature.resizable',
|
|
||||||
'dom.disable_window_open_feature.status',
|
|
||||||
'dom.disable_window_open_feature.titlebar',
|
|
||||||
'dom.disable_window_open_feature.toolbar',
|
|
||||||
'dom.disable_window_status_change',
|
|
||||||
'dom.event.clipboardevents.enabled',
|
|
||||||
'dom.flyweb.enabled',
|
|
||||||
'dom.idle-observers-api.enabled',
|
|
||||||
'dom.imagecapture.enabled',
|
|
||||||
'dom.IntersectionObserver.enabled',
|
|
||||||
'dom.ipc.plugins.flash.subprocess.crashreporter.enabled',
|
|
||||||
'dom.ipc.plugins.reportCrashURL',
|
|
||||||
'dom.popup_allowed_events',
|
|
||||||
'dom.popup_maximum',
|
|
||||||
'dom.push.connection.enabled',
|
|
||||||
'dom.push.enabled',
|
|
||||||
'dom.push.serverURL',
|
|
||||||
'dom.push.userAgentID',
|
|
||||||
'dom.serviceWorkers.enabled',
|
|
||||||
'dom.vibrator.enabled',
|
|
||||||
'dom.webaudio.enabled',
|
|
||||||
'dom.webnotifications.enabled',
|
|
||||||
'dom.webnotifications.serviceworker.enabled',
|
|
||||||
'dom.workers.enabled',
|
|
||||||
'experiments.activeExperiment',
|
|
||||||
'experiments.enabled',
|
|
||||||
'experiments.manifest.uri',
|
|
||||||
'experiments.supported',
|
|
||||||
'extensions.autoDisableScopes',
|
|
||||||
'extensions.blocklist.enabled',
|
|
||||||
'extensions.blocklist.url',
|
|
||||||
'extensions.enabledScopes',
|
|
||||||
'extensions.formautofill.addresses.enabled',
|
|
||||||
'extensions.formautofill.available',
|
|
||||||
'extensions.formautofill.creditCards.enabled',
|
|
||||||
'extensions.formautofill.heuristics.enabled',
|
|
||||||
'extensions.getAddons.cache.enabled',
|
|
||||||
'extensions.getAddons.showPane',
|
|
||||||
'extensions.pocket.enabled',
|
|
||||||
'extensions.shield-recipe-client.api_url',
|
|
||||||
'extensions.shield-recipe-client.enabled',
|
|
||||||
'extensions.update.autoUpdateDefault',
|
|
||||||
'extensions.webcompat-reporter.enabled',
|
|
||||||
'extensions.webextensions.keepStorageOnUninstall',
|
|
||||||
'extensions.webextensions.keepUuidOnUninstall',
|
|
||||||
'extensions.webservice.discoverURL',
|
|
||||||
'font.blacklist.underline_offset',
|
|
||||||
'full-screen-api.enabled',
|
|
||||||
'general.useragent.compatMode.firefox',
|
|
||||||
'general.useragent.locale',
|
|
||||||
'general.warnOnAboutConfig',
|
|
||||||
'geo.wifi.uri',
|
|
||||||
'gfx.downloadable_fonts.enabled',
|
|
||||||
'gfx.downloadable_fonts.woff2.enabled',
|
|
||||||
'gfx.font_rendering.graphite.enabled',
|
|
||||||
'gfx.font_rendering.opentype_svg.enabled',
|
|
||||||
'gfx.offscreencanvas.enabled',
|
|
||||||
'intl.accept_languages',
|
|
||||||
'intl.locale.matchOS',
|
|
||||||
'intl.regional_prefs.use_os_locales',
|
|
||||||
'javascript.options.asmjs',
|
|
||||||
'javascript.options.wasm',
|
|
||||||
'javascript.use_us_english_locale',
|
|
||||||
'keyword.enabled',
|
|
||||||
'layers.acceleration.disabled',
|
|
||||||
'layout.css.font-loading-api.enabled',
|
|
||||||
'layout.css.visited_links_enabled',
|
|
||||||
'layout.spellcheckDefault',
|
|
||||||
'lightweightThemes.update.enabled',
|
|
||||||
'mathml.disabled',
|
|
||||||
'media.autoplay.enabled',
|
|
||||||
'media.block-autoplay-until-in-foreground',
|
|
||||||
'media.eme.enabled',
|
|
||||||
'media.getusermedia.audiocapture.enabled',
|
|
||||||
'media.getusermedia.browser.enabled',
|
|
||||||
'media.getusermedia.screensharing.allowed_domains',
|
|
||||||
'media.getusermedia.screensharing.enabled',
|
|
||||||
'media.gmp-gmpopenh264.autoupdate',
|
|
||||||
'media.gmp-gmpopenh264.enabled',
|
|
||||||
'media.gmp-manager.updateEnabled',
|
|
||||||
'media.gmp-manager.url',
|
|
||||||
'media.gmp-manager.url.override',
|
|
||||||
'media.gmp-provider.enabled',
|
|
||||||
'media.gmp-widevinecdm.autoupdate',
|
|
||||||
'media.gmp-widevinecdm.enabled',
|
|
||||||
'media.gmp-widevinecdm.visible',
|
|
||||||
'media.gmp.trial-create.enabled',
|
|
||||||
'media.navigator.enabled',
|
|
||||||
'media.navigator.video.enabled',
|
|
||||||
'media.ondevicechange.enabled',
|
|
||||||
'media.peerconnection.enabled',
|
|
||||||
'media.peerconnection.ice.default_address_only',
|
|
||||||
'media.peerconnection.ice.no_host',
|
|
||||||
'media.peerconnection.ice.tcp',
|
|
||||||
'media.peerconnection.identity.enabled',
|
|
||||||
'media.peerconnection.identity.timeout',
|
|
||||||
'media.peerconnection.turn.disable',
|
|
||||||
'media.peerconnection.use_document_iceservers',
|
|
||||||
'media.peerconnection.video.enabled',
|
|
||||||
'middlemouse.contentLoadURL',
|
|
||||||
'network.allow-experiments',
|
|
||||||
'network.auth.subresource-img-cross-origin-http-auth-allow',
|
|
||||||
'network.captive-portal-service.enabled',
|
|
||||||
'network.cookie.cookieBehavior',
|
|
||||||
'network.cookie.leave-secure-alone',
|
|
||||||
'network.cookie.thirdparty.sessionOnly',
|
|
||||||
'network.dns.blockDotOnion',
|
|
||||||
'network.dns.disablePrefetch',
|
|
||||||
'network.dns.disablePrefetchFromHTTPS',
|
|
||||||
'network.http.altsvc.enabled',
|
|
||||||
'network.http.altsvc.oe',
|
|
||||||
'network.http.redirection-limit',
|
|
||||||
'network.http.referer.hideOnionSource',
|
|
||||||
'network.http.referer.spoofSource',
|
|
||||||
'network.http.referer.trimmingPolicy',
|
|
||||||
'network.http.referer.userControlPolicy',
|
|
||||||
'network.http.referer.XOriginPolicy',
|
|
||||||
'network.http.referer.XOriginTrimmingPolicy',
|
|
||||||
'network.http.sendRefererHeader',
|
|
||||||
'network.http.spdy.enabled',
|
|
||||||
'network.http.spdy.enabled.deps',
|
|
||||||
'network.http.spdy.enabled.http2',
|
|
||||||
'network.http.speculative-parallel-limit',
|
|
||||||
'network.IDN_show_punycode',
|
|
||||||
'network.jar.block-remote-files',
|
|
||||||
'network.jar.open-unsafe-types',
|
|
||||||
'network.manage-offline-status',
|
|
||||||
'network.predictor.enable-prefetch',
|
|
||||||
'network.predictor.enabled',
|
|
||||||
'network.prefetch-next',
|
|
||||||
'network.protocol-handler.external.ms-windows-store',
|
|
||||||
'network.proxy.autoconfig_url.include_path',
|
|
||||||
'network.proxy.socks_remote_dns',
|
|
||||||
'network.stricttransportsecurity.preloadlist',
|
|
||||||
'offline-apps.allow_by_default',
|
|
||||||
'pdfjs.disabled',
|
|
||||||
'pdfjs.enableWebGL',
|
|
||||||
'permissions.manager.defaultsUrl',
|
|
||||||
'plugin.default.state',
|
|
||||||
'plugin.defaultXpi.state',
|
|
||||||
'plugin.scan.plid.all',
|
|
||||||
'plugin.sessionPermissionNow.intervalInMinutes',
|
|
||||||
'plugins.click_to_play',
|
|
||||||
'privacy.clearOnShutdown.cache',
|
|
||||||
'privacy.clearOnShutdown.cookies',
|
|
||||||
'privacy.clearOnShutdown.downloads',
|
|
||||||
'privacy.clearOnShutdown.formdata',
|
|
||||||
'privacy.clearOnShutdown.history',
|
|
||||||
'privacy.clearOnShutdown.offlineApps',
|
|
||||||
'privacy.clearOnShutdown.sessions',
|
|
||||||
'privacy.clearOnShutdown.siteSettings',
|
|
||||||
'privacy.cpd.cache',
|
|
||||||
'privacy.cpd.cookies',
|
|
||||||
'privacy.cpd.formdata',
|
|
||||||
'privacy.cpd.history',
|
|
||||||
'privacy.cpd.offlineApps',
|
|
||||||
'privacy.cpd.passwords',
|
|
||||||
'privacy.cpd.sessions',
|
|
||||||
'privacy.cpd.siteSettings',
|
|
||||||
'privacy.donottrackheader.enabled',
|
|
||||||
'privacy.firstparty.isolate',
|
|
||||||
'privacy.firstparty.isolate.restrict_opener_access',
|
|
||||||
'privacy.resistFingerprinting',
|
|
||||||
'privacy.sanitize.sanitizeOnShutdown',
|
|
||||||
'privacy.sanitize.timeSpan',
|
|
||||||
'privacy.trackingprotection.ui.enabled',
|
|
||||||
'security.ask_for_password',
|
|
||||||
'security.block_script_with_wrong_mime',
|
|
||||||
'security.cert_pinning.enforcement_level',
|
|
||||||
'security.csp.enable',
|
|
||||||
'security.csp.experimentalEnabled',
|
|
||||||
'security.data_uri.block_toplevel_data_uri_navigations',
|
|
||||||
'security.dialog_enable_delay',
|
|
||||||
'security.family_safety.mode',
|
|
||||||
'security.fileuri.strict_origin_policy',
|
|
||||||
'security.insecure_field_warning.contextual.enabled',
|
|
||||||
'security.insecure_password.ui.enabled',
|
|
||||||
'security.mixed_content.block_active_content',
|
|
||||||
'security.mixed_content.send_hsts_priming',
|
|
||||||
'security.mixed_content.use_hsts',
|
|
||||||
'security.OCSP.enabled',
|
|
||||||
'security.OCSP.require',
|
|
||||||
'security.password_lifetime',
|
|
||||||
'security.pki.sha1_enforcement_level',
|
|
||||||
'security.sri.enable',
|
|
||||||
'security.ssl.disable_session_identifiers',
|
|
||||||
'security.ssl.enable_ocsp_stapling',
|
|
||||||
'security.ssl.errorReporting.automatic',
|
|
||||||
'security.ssl.errorReporting.enabled',
|
|
||||||
'security.ssl.errorReporting.url',
|
|
||||||
'security.ssl.treat_unsafe_negotiation_as_broken',
|
|
||||||
'security.tls.enable_0rtt_data',
|
|
||||||
'security.tls.version.fallback-limit',
|
|
||||||
'security.tls.version.max',
|
|
||||||
'security.tls.version.min',
|
|
||||||
'security.xpconnect.plugin.unrestricted',
|
|
||||||
'services.blocklist.signing.enforced',
|
|
||||||
'services.blocklist.update_enabled',
|
|
||||||
'signon.autofillForms',
|
|
||||||
'signon.autofillForms.http',
|
|
||||||
'signon.formlessCapture.enabled',
|
|
||||||
'signon.storeWhenAutocompleteOff',
|
|
||||||
'startup.homepage_override_url',
|
|
||||||
'startup.homepage_welcome_url',
|
|
||||||
'startup.homepage_welcome_url.additional',
|
|
||||||
'toolkit.telemetry.archive.enabled',
|
|
||||||
'toolkit.telemetry.bhrPing.enabled',
|
|
||||||
'toolkit.telemetry.cachedClientID',
|
|
||||||
'toolkit.telemetry.enabled',
|
|
||||||
'toolkit.telemetry.firstShutdownPing.enabled',
|
|
||||||
'toolkit.telemetry.newProfilePing.enabled',
|
|
||||||
'toolkit.telemetry.server',
|
|
||||||
'toolkit.telemetry.shutdownPingSender.enabled',
|
|
||||||
'toolkit.telemetry.unified',
|
|
||||||
'toolkit.telemetry.updatePing.enabled',
|
|
||||||
'ui.submenuDelay',
|
|
||||||
'ui.use_standins_for_native_colors',
|
|
||||||
'view_source.tab',
|
|
||||||
'webchannel.allowObject.urlWhitelist',
|
|
||||||
'webgl.disable-extensions',
|
|
||||||
'webgl.disable-fail-if-major-performance-caveat',
|
|
||||||
'webgl.disabled',
|
|
||||||
'webgl.dxgl.enabled',
|
|
||||||
'webgl.enable-debug-renderer-info',
|
|
||||||
'webgl.enable-webgl2',
|
|
||||||
'webgl.min_capability_mode',
|
|
||||||
|
|
||||||
/* reset parrot: check your open about:config after running the script */
|
|
||||||
'_user.js.parrot'
|
|
||||||
]
|
|
||||||
|
|
||||||
if("undefined" === typeof(Services)) {
|
|
||||||
alert("about:config needs to be the active tab!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let c = 0;
|
|
||||||
for (let i = 0, len = ops.length; i < len; i++) {
|
|
||||||
if (Services.prefs.prefHasUserValue(ops[i])) {
|
|
||||||
Services.prefs.clearUserPref(ops[i]);
|
|
||||||
if (!Services.prefs.prefHasUserValue(ops[i])) {
|
|
||||||
console.log("reset", ops[i]);
|
|
||||||
c++;
|
|
||||||
} else { console.log("failed to reset", ops[i]); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
focus();
|
|
||||||
|
|
||||||
let d = (c==1) ? " pref" : " prefs";
|
|
||||||
if (c > 0) {
|
|
||||||
alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
|
|
||||||
} else { alert("nothing to reset"); }
|
|
||||||
|
|
||||||
})();
|
|
@ -1,167 +0,0 @@
|
|||||||
/***
|
|
||||||
|
|
||||||
This will reset EVERYTHING that is INACTIVE in the ghacks user.js
|
|
||||||
release 57-alpha master, but excludes the following:
|
|
||||||
- prefs removed since publishing on github
|
|
||||||
- e10s section 1100
|
|
||||||
- privacy.resistFingerprinting alternatives sections 4600 & 4700
|
|
||||||
- deprecated section 9999
|
|
||||||
|
|
||||||
It does not matter if you clear everything, as a restart will reapply your user.js
|
|
||||||
Total 477 prefs from 57-alpha master: 118 inactive, 359 active
|
|
||||||
These have been broken into two scripts for convenience
|
|
||||||
|
|
||||||
For instructions see:
|
|
||||||
https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
|
||||||
|
|
||||||
***/
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
let ops = [
|
|
||||||
/* 118 INACTIVE prefs in 57-alpha master */
|
|
||||||
'accessibility.typeaheadfind',
|
|
||||||
'app.update.enabled',
|
|
||||||
'browser.cache.memory.capacity',
|
|
||||||
'browser.cache.memory.enable',
|
|
||||||
'browser.chrome.favicons',
|
|
||||||
'browser.chrome.site_icons',
|
|
||||||
'browser.download.autohideButton',
|
|
||||||
'browser.privatebrowsing.autostart',
|
|
||||||
'browser.safebrowsing.allowOverride',
|
|
||||||
'browser.safebrowsing.blockedURIs.enabled',
|
|
||||||
'browser.safebrowsing.downloads.enabled',
|
|
||||||
'browser.safebrowsing.downloads.remote.block_dangerous',
|
|
||||||
'browser.safebrowsing.downloads.remote.block_dangerous_host',
|
|
||||||
'browser.safebrowsing.downloads.remote.block_potentially_unwanted',
|
|
||||||
'browser.safebrowsing.downloads.remote.block_uncommon',
|
|
||||||
'browser.safebrowsing.malware.enabled',
|
|
||||||
'browser.safebrowsing.phishing.enabled',
|
|
||||||
'browser.safebrowsing.provider.google.gethashURL',
|
|
||||||
'browser.safebrowsing.provider.google.updateURL',
|
|
||||||
'browser.safebrowsing.provider.google4.gethashURL',
|
|
||||||
'browser.safebrowsing.provider.google4.updateURL',
|
|
||||||
'browser.safebrowsing.provider.mozilla.gethashURL',
|
|
||||||
'browser.safebrowsing.provider.mozilla.updateURL',
|
|
||||||
'browser.sessionhistory.max_total_viewers',
|
|
||||||
'browser.startup.page',
|
|
||||||
'browser.stopReloadAnimation.enabled',
|
|
||||||
'browser.storageManager.enabled',
|
|
||||||
'browser.tabs.loadBookmarksInTabs',
|
|
||||||
'browser.urlbar.autocomplete.enabled',
|
|
||||||
'browser.urlbar.maxRichResults',
|
|
||||||
'clipboard.autocopy',
|
|
||||||
'dom.event.contextmenu.enabled',
|
|
||||||
'dom.indexedDB.enabled',
|
|
||||||
'dom.presentation.controller.enabled',
|
|
||||||
'dom.presentation.discoverable',
|
|
||||||
'dom.presentation.discovery.enabled',
|
|
||||||
'dom.presentation.enabled',
|
|
||||||
'dom.presentation.receiver.enabled',
|
|
||||||
'dom.presentation.session_transport.data_channel.enable',
|
|
||||||
'dom.storage.enabled',
|
|
||||||
'dom.storageManager.enabled',
|
|
||||||
'dom.vr.enabled',
|
|
||||||
'extensions.screenshots.disabled',
|
|
||||||
'extensions.systemAddon.update.url',
|
|
||||||
'extensions.update.enabled',
|
|
||||||
'font.name.monospace.x-unicode',
|
|
||||||
'font.name.monospace.x-western',
|
|
||||||
'font.name.sans-serif.x-unicode',
|
|
||||||
'font.name.sans-serif.x-western',
|
|
||||||
'font.name.serif.x-unicode',
|
|
||||||
'font.name.serif.x-western',
|
|
||||||
'font.system.whitelist',
|
|
||||||
'full-screen-api.warning.delay',
|
|
||||||
'full-screen-api.warning.timeout',
|
|
||||||
'general.autoScroll',
|
|
||||||
'geo.wifi.logging.enabled',
|
|
||||||
'gfx.direct2d.disabled',
|
|
||||||
'javascript.options.baselinejit',
|
|
||||||
'javascript.options.ion',
|
|
||||||
'media.flac.enabled',
|
|
||||||
'media.mediasource.enabled',
|
|
||||||
'media.mediasource.mp4.enabled',
|
|
||||||
'media.mediasource.webm.audio.enabled',
|
|
||||||
'media.mediasource.webm.enabled',
|
|
||||||
'media.mp4.enabled',
|
|
||||||
'media.ogg.enabled',
|
|
||||||
'media.ogg.flac.enabled',
|
|
||||||
'media.opus.enabled',
|
|
||||||
'media.raw.enabled',
|
|
||||||
'media.wave.enabled',
|
|
||||||
'media.webm.enabled',
|
|
||||||
'media.wmf.amd.vp9.enabled',
|
|
||||||
'media.wmf.enabled',
|
|
||||||
'media.wmf.vp9.enabled',
|
|
||||||
'network.cookie.lifetime.days',
|
|
||||||
'network.cookie.lifetimePolicy',
|
|
||||||
'network.dns.disableIPv6',
|
|
||||||
'network.dnsCacheEntries',
|
|
||||||
'network.dnsCacheExpiration',
|
|
||||||
'network.http.fast-fallback-to-IPv4',
|
|
||||||
'offline-apps.quota.warn',
|
|
||||||
'permissions.memory_only',
|
|
||||||
'places.history.enabled',
|
|
||||||
'plugin.state.flash',
|
|
||||||
'privacy.clearOnShutdown.openWindows',
|
|
||||||
'privacy.cpd.downloads',
|
|
||||||
'privacy.cpd.openWindows',
|
|
||||||
'privacy.resistFingerprinting.block_mozAddonManager',
|
|
||||||
'privacy.trackingprotection.annotate_channels',
|
|
||||||
'privacy.trackingprotection.enabled',
|
|
||||||
'privacy.trackingprotection.lower_network_priority',
|
|
||||||
'privacy.trackingprotection.pbmode.enabled',
|
|
||||||
'privacy.usercontext.about_newtab_segregation.enabled',
|
|
||||||
'privacy.userContext.enabled',
|
|
||||||
'privacy.userContext.longPressBehavior',
|
|
||||||
'privacy.userContext.ui.enabled',
|
|
||||||
'privacy.window.maxInnerHeight',
|
|
||||||
'privacy.window.maxInnerWidth',
|
|
||||||
'reader.parse-on-load.enabled',
|
|
||||||
'security.mixed_content.block_display_content',
|
|
||||||
'security.nocertdb',
|
|
||||||
'security.ssl.require_safe_negotiation',
|
|
||||||
'security.ssl3.dhe_rsa_aes_128_sha',
|
|
||||||
'security.ssl3.dhe_rsa_aes_256_sha',
|
|
||||||
'security.ssl3.ecdhe_ecdsa_aes_128_sha',
|
|
||||||
'security.ssl3.ecdhe_rsa_aes_128_sha',
|
|
||||||
'security.ssl3.rsa_aes_128_sha',
|
|
||||||
'security.ssl3.rsa_aes_256_sha',
|
|
||||||
'security.ssl3.rsa_des_ede3_sha',
|
|
||||||
'services.blocklist.addons.collection',
|
|
||||||
'services.blocklist.gfx.collection',
|
|
||||||
'services.blocklist.onecrl.collection',
|
|
||||||
'services.blocklist.plugins.collection',
|
|
||||||
'signon.rememberSignons',
|
|
||||||
'svg.disabled',
|
|
||||||
'toolkit.cosmeticAnimations.enabled',
|
|
||||||
'urlclassifier.trackingTable',
|
|
||||||
'xpinstall.signatures.required',
|
|
||||||
/* reset parrot: check your open about:config after running the script */
|
|
||||||
'_user.js.parrot'
|
|
||||||
]
|
|
||||||
|
|
||||||
if("undefined" === typeof(Services)) {
|
|
||||||
alert("about:config needs to be the active tab!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let c = 0;
|
|
||||||
for (let i = 0, len = ops.length; i < len; i++) {
|
|
||||||
if (Services.prefs.prefHasUserValue(ops[i])) {
|
|
||||||
Services.prefs.clearUserPref(ops[i]);
|
|
||||||
if (!Services.prefs.prefHasUserValue(ops[i])) {
|
|
||||||
console.log("reset", ops[i]);
|
|
||||||
c++;
|
|
||||||
} else { console.log("failed to reset", ops[i]); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
focus();
|
|
||||||
|
|
||||||
let d = (c==1) ? " pref" : " prefs";
|
|
||||||
if (c > 0) {
|
|
||||||
alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
|
|
||||||
} else { alert("nothing to reset"); }
|
|
||||||
|
|
||||||
})();
|
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/*** ghacks-user.js troubleshooter.js v1.5 ***/
|
/*** ghacks-user.js troubleshooter.js v1.5.2 ***/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
@ -82,7 +82,6 @@
|
|||||||
'dom.push.enabled',
|
'dom.push.enabled',
|
||||||
'dom.push.serverURL',
|
'dom.push.serverURL',
|
||||||
'dom.serviceWorkers.enabled',
|
'dom.serviceWorkers.enabled',
|
||||||
'dom.workers.enabled',
|
|
||||||
'dom.webnotifications.enabled',
|
'dom.webnotifications.enabled',
|
||||||
'dom.webnotifications.serviceworker.enabled',
|
'dom.webnotifications.serviceworker.enabled',
|
||||||
|
|
||||||
@ -116,6 +115,7 @@
|
|||||||
/* Audio + Video */
|
/* Audio + Video */
|
||||||
'dom.webaudio.enabled',
|
'dom.webaudio.enabled',
|
||||||
'media.autoplay.enabled',
|
'media.autoplay.enabled',
|
||||||
|
'media.autoplay.default', // FF63+
|
||||||
|
|
||||||
/* Forms */
|
/* Forms */
|
||||||
'browser.formfill.enable',
|
'browser.formfill.enable',
|
||||||
@ -125,7 +125,6 @@
|
|||||||
/* HTTPS */
|
/* HTTPS */
|
||||||
'security.cert_pinning.enforcement_level',
|
'security.cert_pinning.enforcement_level',
|
||||||
'security.family_safety.mode',
|
'security.family_safety.mode',
|
||||||
'security.mixed_content.use_hsts',
|
|
||||||
'security.OCSP.require',
|
'security.OCSP.require',
|
||||||
'security.pki.sha1_enforcement_level',
|
'security.pki.sha1_enforcement_level',
|
||||||
'security.ssl.require_safe_negotiation',
|
'security.ssl.require_safe_negotiation',
|
||||||
@ -152,7 +151,7 @@
|
|||||||
'dom.popup_maximum',
|
'dom.popup_maximum',
|
||||||
'layout.css.visited_links_enabled',
|
'layout.css.visited_links_enabled',
|
||||||
'mathml.disabled',
|
'mathml.disabled',
|
||||||
'network.auth.subresource-img-cross-origin-http-auth-allow',
|
'network.auth.subresource-http-auth-allow',
|
||||||
'network.http.redirection-limit',
|
'network.http.redirection-limit',
|
||||||
'network.protocol-handler.external.ms-windows-store',
|
'network.protocol-handler.external.ms-windows-store',
|
||||||
'privacy.trackingprotection.enabled',
|
'privacy.trackingprotection.enabled',
|
||||||
|
85
updater.bat
85
updater.bat
@ -3,11 +3,16 @@ TITLE ghacks user.js updater
|
|||||||
|
|
||||||
REM ## ghacks-user.js updater for Windows
|
REM ## ghacks-user.js updater for Windows
|
||||||
REM ## author: @claustromaniac
|
REM ## author: @claustromaniac
|
||||||
REM ## version: 4.4
|
REM ## version: 4.6
|
||||||
REM ## instructions: https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.3-Updater-Scripts
|
REM ## instructions: https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.3-Updater-Scripts
|
||||||
|
|
||||||
|
SET v=4.7
|
||||||
|
|
||||||
|
VERIFY ON
|
||||||
|
CD /D "%~dp0"
|
||||||
SET _myname=%~n0
|
SET _myname=%~n0
|
||||||
SET _myparams=%*
|
SET _myparams=%*
|
||||||
|
|
||||||
:parse
|
:parse
|
||||||
IF "%~1"=="" (GOTO endparse)
|
IF "%~1"=="" (GOTO endparse)
|
||||||
IF /I "%~1"=="-unattended" (SET _ua=1)
|
IF /I "%~1"=="-unattended" (SET _ua=1)
|
||||||
@ -20,17 +25,21 @@ IF /I "%~1"=="-singlebackup" (SET _singlebackup=1)
|
|||||||
SHIFT
|
SHIFT
|
||||||
GOTO parse
|
GOTO parse
|
||||||
:endparse
|
:endparse
|
||||||
|
|
||||||
IF DEFINED _updateb (
|
IF DEFINED _updateb (
|
||||||
REM The normal flow here goes from phase 1 to phase 2 and then phase 3.
|
REM The normal flow here goes from phase 1 to phase 2 and then phase 3.
|
||||||
IF NOT "!_myname:~0,9!"=="[updated]" (
|
IF NOT "!_myname:~0,9!"=="[updated]" (
|
||||||
IF EXIST "[updated]!_myname!.bat" (
|
IF EXIST "[updated]!_myname!.bat" (
|
||||||
REM ## Phase 3 ##: The new script, with the original name, will:
|
REM ## Phase 3 ##: The new script, with the original name, will:
|
||||||
REM * Delete the [updated]*.bat script
|
REM * Delete the [updated]*.bat and *.bat.old scripts
|
||||||
REM * Begin the normal routine
|
REM * Begin the normal routine
|
||||||
|
FC "[updated]!_myname!.bat" "!_myname!.bat.old" >nul
|
||||||
|
IF NOT "!errorlevel!"=="0" (
|
||||||
|
CALL :message "Script updated to version !v!"
|
||||||
|
TIMEOUT 3 >nul
|
||||||
|
)
|
||||||
REN "[updated]!_myname!.bat" "[updated]!_myname!.bat.old"
|
REN "[updated]!_myname!.bat" "[updated]!_myname!.bat.old"
|
||||||
DEL /F "[updated]!_myname!.bat.old"
|
DEL /F "!_myname!.bat.old" "[updated]!_myname!.bat.old"
|
||||||
CALL :message "Script updated^!"
|
|
||||||
TIMEOUT 3 >nul
|
|
||||||
GOTO begin
|
GOTO begin
|
||||||
)
|
)
|
||||||
REM ## Phase 1 ##
|
REM ## Phase 1 ##
|
||||||
@ -38,10 +47,10 @@ IF DEFINED _updateb (
|
|||||||
REM * Start that script in a new CMD window
|
REM * Start that script in a new CMD window
|
||||||
REM * Exit
|
REM * Exit
|
||||||
CALL :message "Updating script..."
|
CALL :message "Updating script..."
|
||||||
REM Uncomment the next line and comment the powershell call for testing.
|
REM Uncomment the next line and comment out the PowerShell call for testing.
|
||||||
REM COPY /B /V /Y "!_myname!.bat" "[updated]!_myname!.bat"
|
REM COPY /B /Y "!_myname!.bat" "[updated]!_myname!.bat" >nul
|
||||||
(
|
(
|
||||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/updater.bat', '[updated]!_myname!.bat')"
|
PowerShell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/updater.bat', '[updated]!_myname!.bat')"
|
||||||
) >nul 2>&1
|
) >nul 2>&1
|
||||||
IF EXIST "[updated]!_myname!.bat" (
|
IF EXIST "[updated]!_myname!.bat" (
|
||||||
START /min CMD /C "[updated]!_myname!.bat" !_myparams!
|
START /min CMD /C "[updated]!_myname!.bat" !_myparams!
|
||||||
@ -55,19 +64,17 @@ IF DEFINED _updateb (
|
|||||||
TIMEOUT 300 >nul
|
TIMEOUT 300 >nul
|
||||||
) ELSE (
|
) ELSE (
|
||||||
REM ## Phase 2 ##: The [updated]*.bat script will:
|
REM ## Phase 2 ##: The [updated]*.bat script will:
|
||||||
REM * Copy itself overwriting the original batch
|
REM * Rename the old script and make a copy of itself with the original name.
|
||||||
REM * Start that script in a new CMD instance
|
REM * Run that copy in a new CMD instance
|
||||||
REM * Exit
|
REM * Exit
|
||||||
IF EXIST "!_myname:~9!.bat" (
|
IF EXIST "!_myname:~9!.bat" ( REN "!_myname:~9!.bat" "!_myname:~9!.bat.old" )
|
||||||
REN "!_myname:~9!.bat" "!_myname:~9!.bat.old"
|
COPY /B /Y "!_myname!.bat" "!_myname:~9!.bat"
|
||||||
DEL /F "!_myname:~9!.bat.old"
|
|
||||||
)
|
|
||||||
COPY /B /V /Y "!_myname!.bat" "!_myname:~9!.bat"
|
|
||||||
START CMD /C "!_myname:~9!.bat" !_myparams!
|
START CMD /C "!_myname:~9!.bat" !_myparams!
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
EXIT /B
|
EXIT /B
|
||||||
)
|
)
|
||||||
|
|
||||||
:begin
|
:begin
|
||||||
CLS
|
CLS
|
||||||
ECHO:
|
ECHO:
|
||||||
@ -75,7 +82,7 @@ ECHO:
|
|||||||
ECHO: ########################################
|
ECHO: ########################################
|
||||||
ECHO: #### user.js Updater for Windows ####
|
ECHO: #### user.js Updater for Windows ####
|
||||||
ECHO: #### by claustromaniac ####
|
ECHO: #### by claustromaniac ####
|
||||||
ECHO: #### v4.4 ####
|
ECHO: #### v!v! ####
|
||||||
ECHO: ########################################
|
ECHO: ########################################
|
||||||
ECHO:
|
ECHO:
|
||||||
SET /A "_line=0"
|
SET /A "_line=0"
|
||||||
@ -121,7 +128,7 @@ IF DEFINED _log (
|
|||||||
IF EXIST user.js.new (DEL /F "user.js.new")
|
IF EXIST user.js.new (DEL /F "user.js.new")
|
||||||
CALL :message "Retrieving latest user.js file from github repository..."
|
CALL :message "Retrieving latest user.js file from github repository..."
|
||||||
(
|
(
|
||||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js', 'user.js.new')"
|
PowerShell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js', 'user.js.new')"
|
||||||
) >nul 2>&1
|
) >nul 2>&1
|
||||||
IF EXIST user.js.new (
|
IF EXIST user.js.new (
|
||||||
IF DEFINED _multi (
|
IF DEFINED _multi (
|
||||||
@ -129,18 +136,18 @@ IF EXIST user.js.new (
|
|||||||
IF NOT ERRORLEVEL 1 (
|
IF NOT ERRORLEVEL 1 (
|
||||||
IF DEFINED _merge (
|
IF DEFINED _merge (
|
||||||
CALL :message "Merging..."
|
CALL :message "Merging..."
|
||||||
COPY /B /V /Y user.js-overrides\*.js user-overrides-merged.js
|
COPY /B /Y user.js-overrides\*.js user-overrides-merged.js
|
||||||
CALL :merge user-overrides-merged.js
|
CALL :merge user-overrides-merged.js
|
||||||
COPY /B /V /Y user.js.new+user-overrides-merged.js user.js.new
|
COPY /B /Y user.js.new+user-overrides-merged.js user.js.new
|
||||||
CALL :merge user.js.new
|
CALL :merge user.js.new
|
||||||
) ELSE (
|
) ELSE (
|
||||||
CALL :message "Appending..."
|
CALL :message "Appending..."
|
||||||
COPY /B /V /Y user.js.new+"user.js-overrides\*.js" user.js.new
|
COPY /B /Y user.js.new+"user.js-overrides\*.js" user.js.new
|
||||||
)
|
)
|
||||||
) ELSE (CALL :message "No override files found.")
|
) ELSE (CALL :message "No override files found.")
|
||||||
) ELSE (
|
) ELSE (
|
||||||
IF EXIST "user-overrides.js" (
|
IF EXIST "user-overrides.js" (
|
||||||
COPY /B /V /Y user.js.new+"user-overrides.js" "user.js.new"
|
COPY /B /Y user.js.new+"user-overrides.js" "user.js.new"
|
||||||
IF DEFINED _merge (
|
IF DEFINED _merge (
|
||||||
CALL :message "Merging user-overrides.js..."
|
CALL :message "Merging user-overrides.js..."
|
||||||
CALL :merge user.js.new
|
CALL :merge user.js.new
|
||||||
@ -157,7 +164,8 @@ IF EXIST user.js.new (
|
|||||||
IF DEFINED _singlebackup (
|
IF DEFINED _singlebackup (
|
||||||
MOVE /Y user.js user.js.bak >nul
|
MOVE /Y user.js user.js.bak >nul
|
||||||
) ELSE (
|
) ELSE (
|
||||||
MOVE /Y user.js "user-backup-!date:/=-!_!time::=.!.js" >nul
|
SET "_time=!time: =0!"
|
||||||
|
MOVE /Y user.js "user-backup-!date:/=-!_!_time::=.!.js" >nul
|
||||||
)
|
)
|
||||||
REN user.js.new user.js
|
REN user.js.new user.js
|
||||||
CALL :message "Update complete."
|
CALL :message "Update complete."
|
||||||
@ -168,6 +176,7 @@ IF EXIST user.js.new (
|
|||||||
) ELSE (
|
) ELSE (
|
||||||
REN user.js.new user.js
|
REN user.js.new user.js
|
||||||
CALL :message "Update complete."
|
CALL :message "Update complete."
|
||||||
|
SET "_changed=true"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@ -175,7 +184,15 @@ IF EXIST user.js.new (
|
|||||||
ECHO: No changes were made.
|
ECHO: No changes were made.
|
||||||
)
|
)
|
||||||
IF NOT DEFINED _log (
|
IF NOT DEFINED _log (
|
||||||
IF NOT DEFINED _ua (PAUSE)
|
IF NOT DEFINED _ua (
|
||||||
|
IF EXIST prefsCleaner.bat (
|
||||||
|
IF "!_changed!"=="true" (
|
||||||
|
CALL :message "Would you like to run the prefsCleaner now?"
|
||||||
|
CHOICE /C YN /N /M "(Y/N) "
|
||||||
|
IF "1"=="!errorlevel!" ( START "" cmd.exe /C "prefsCleaner.bat" )
|
||||||
|
) ELSE (PAUSE)
|
||||||
|
) ELSE (PAUSE)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
EXIT /B
|
EXIT /B
|
||||||
|
|
||||||
@ -187,11 +204,13 @@ ECHO: %~1
|
|||||||
IF NOT "2"=="%_log%" (ECHO:)
|
IF NOT "2"=="%_log%" (ECHO:)
|
||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
GOTO :EOF
|
GOTO :EOF
|
||||||
|
|
||||||
REM ############ Merge function ############
|
REM ############ Merge function ############
|
||||||
:merge
|
:merge
|
||||||
SETLOCAL DisableDelayedExpansion
|
SETLOCAL DisableDelayedExpansion
|
||||||
|
FOR /F tokens^=2^,^*^ delims^=^'^" %%G IN ('FINDSTR /R /C:"^user_pref[ ]*\([ ]*[\"'].*[\"'][ ]*,.*\)[ ]*;" "%~1"') DO (SET "[%%G]=%%H")
|
||||||
|
FOR /F tokens^=2^,^*^ delims^=^' %%G IN ('FINDSTR /R /C:"^//// --- comment-out --- '[^'][^']*'.*" "%~1"') DO (SET "__unset__%%G=1")
|
||||||
(
|
(
|
||||||
FOR /F tokens^=2^,^*^ delims^=^'^" %%G IN ('FINDSTR /B /R /C:"user_pref.*\)[ ]*;" "%~1"') DO (IF NOT "%%H"=="" (SET "%%G=%%H"))
|
|
||||||
FOR /F "tokens=1,* delims=:" %%I IN ('FINDSTR /N "^" "%~1"') DO (
|
FOR /F "tokens=1,* delims=:" %%I IN ('FINDSTR /N "^" "%~1"') DO (
|
||||||
SET "_temp=%%J"
|
SET "_temp=%%J"
|
||||||
SETLOCAL EnableDelayedExpansion
|
SETLOCAL EnableDelayedExpansion
|
||||||
@ -204,11 +223,15 @@ SETLOCAL DisableDelayedExpansion
|
|||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
FOR /F tokens^=2^ delims^=^'^" %%K IN ("%%J") DO (
|
FOR /F tokens^=2^ delims^=^'^" %%K IN ("%%J") DO (
|
||||||
IF NOT "_user.js.parrot"=="%%K" (
|
IF NOT "_user.js.parrot"=="%%K" (
|
||||||
IF DEFINED %%K (
|
IF DEFINED __unset__%%K (
|
||||||
SETLOCAL EnableDelayedExpansion
|
ECHO://%%J
|
||||||
FOR /F "delims=" %%L IN ("!%%K!") DO (
|
) ELSE (
|
||||||
ENDLOCAL & ECHO:user_pref("%%K"%%L
|
IF DEFINED [%%K] (
|
||||||
SET "%%K="
|
SETLOCAL EnableDelayedExpansion
|
||||||
|
FOR /F "delims=" %%L IN ("![%%K]!") DO (
|
||||||
|
ENDLOCAL & ECHO:user_pref("%%K"%%L
|
||||||
|
SET "[%%K]="
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) ELSE (ECHO:%%J)
|
) ELSE (ECHO:%%J)
|
||||||
@ -220,6 +243,7 @@ SETLOCAL DisableDelayedExpansion
|
|||||||
MOVE /Y updatertempfile "%~1" >nul
|
MOVE /Y updatertempfile "%~1" >nul
|
||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
GOTO :EOF
|
GOTO :EOF
|
||||||
|
|
||||||
REM ############### Help ##################
|
REM ############### Help ##################
|
||||||
:showhelp
|
:showhelp
|
||||||
MODE 80,46
|
MODE 80,46
|
||||||
@ -254,4 +278,3 @@ CALL :message ""
|
|||||||
PAUSE
|
PAUSE
|
||||||
MODE 80,25
|
MODE 80,25
|
||||||
GOTO :begin
|
GOTO :begin
|
||||||
REM #####################################
|
|
||||||
|
443
updater.sh
Normal file → Executable file
443
updater.sh
Normal file → Executable file
@ -1,58 +1,427 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
### ghacks-user.js updater for Mac/Linux
|
## ghacks-user.js updater for macOS and Linux
|
||||||
## author: @overdodactyl
|
|
||||||
## version: 1.2
|
|
||||||
|
|
||||||
ghacksjs="https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js"
|
## version: 2.5
|
||||||
|
## Author: Pat Johnson (@overdodactyl)
|
||||||
|
## Additional contributors: @earthlng, @ema-pe, @claustromaniac
|
||||||
|
|
||||||
echo -e "\nThis script should be run from your Firefox profile directory.\n"
|
## DON'T GO HIGHER THAN VERSION x.9 !! ( because of ASCII comparison in update_updater() )
|
||||||
|
|
||||||
currdir=$(pwd)
|
readonly CURRDIR=$(pwd)
|
||||||
|
|
||||||
## get the full path of this script (readlink for Linux, greadlink for Mac with coreutils installed)
|
|
||||||
sfp=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)
|
sfp=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)
|
||||||
|
|
||||||
## fallback for Macs without coreutils
|
|
||||||
if [ -z "$sfp" ]; then sfp=${BASH_SOURCE[0]}; fi
|
if [ -z "$sfp" ]; then sfp=${BASH_SOURCE[0]}; fi
|
||||||
|
readonly SCRIPT_DIR=$(dirname "${sfp}")
|
||||||
|
|
||||||
## change directory to the Firefox profile directory
|
|
||||||
cd "$(dirname "${sfp}")"
|
|
||||||
|
|
||||||
echo -e "Updating the user.js for Firefox profile:\n$(pwd)\n"
|
#########################
|
||||||
|
# Base variables #
|
||||||
|
#########################
|
||||||
|
|
||||||
if [ -e user.js ]; then
|
# Colors used for printing
|
||||||
echo "Your current user.js file for this profile will be backed up and the latest ghacks version from github will take its place."
|
RED='\033[0;31m'
|
||||||
echo -e "\nIf currently using the ghacks user.js, please compare versions:"
|
BLUE='\033[0;34m'
|
||||||
echo " Available online: $(curl -s ${ghacksjs} | sed -n '4p')"
|
BBLUE='\033[1;34m'
|
||||||
echo " Currently using: $(sed -n '4p' user.js)"
|
GREEN='\033[0;32m'
|
||||||
|
ORANGE='\033[0;33m'
|
||||||
|
CYAN='\033[0;36m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
# Argument defaults
|
||||||
|
UPDATE='check'
|
||||||
|
CONFIRM='yes'
|
||||||
|
OVERRIDE='user-overrides.js'
|
||||||
|
BACKUP='multiple'
|
||||||
|
COMPARE=false
|
||||||
|
SKIPOVERRIDE=false
|
||||||
|
VIEW=false
|
||||||
|
PROFILE_PATH=false
|
||||||
|
ESR=false
|
||||||
|
|
||||||
|
# Download method priority: curl -> wget
|
||||||
|
DOWNLOAD_METHOD=''
|
||||||
|
if [[ $(command -v 'curl') ]]; then
|
||||||
|
DOWNLOAD_METHOD='curl'
|
||||||
|
elif [[ $(command -v 'wget') ]]; then
|
||||||
|
DOWNLOAD_METHOD='wget'
|
||||||
else
|
else
|
||||||
echo "A user.js file does not exist in this profile. If you continue, the latest ghacks version from github will be downloaded."
|
echo -e "${RED}This script requires curl or wget.\nProcess aborted${NC}"
|
||||||
|
exit 0
|
||||||
fi
|
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
|
show_banner () {
|
||||||
echo -e "\n\n"
|
echo -e "${BBLUE}\n"
|
||||||
|
echo ' ############################################################################'
|
||||||
|
echo ' #### ####'
|
||||||
|
echo ' #### ghacks user.js ####'
|
||||||
|
echo ' #### Hardening the Privacy and Security Settings of Firefox ####'
|
||||||
|
echo ' #### Maintained by @Thorin-Oakenpants and @earthlng ####'
|
||||||
|
echo ' #### Updater for macOS and Linux by @overdodactyl ####'
|
||||||
|
echo ' #### ####'
|
||||||
|
echo ' ############################################################################'
|
||||||
|
echo -e "${NC}\n"
|
||||||
|
echo -e "Documentation for this script is available here: ${CYAN}https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.3-Updater-Scripts${NC}\n"
|
||||||
|
}
|
||||||
|
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
#########################
|
||||||
if [ -e user.js ]; then
|
# Arguments #
|
||||||
# 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}"
|
usage() {
|
||||||
|
echo -e "${BLUE}\nUsage: $0 [-h] [-p PROFILE] [-u] [-d] [-s] [-n] [-b] [-c] [-v] [-r] [-e] [-o OVERRIDE]\n${NC}" 1>&2 # Echo usage string to standard error
|
||||||
|
echo 'Optional Arguments:'
|
||||||
|
echo -e "\t-h,\t\t Show this help message and exit."
|
||||||
|
echo -e "\t-p PROFILE,\t Path to your Firefox profile (if different than the dir of this script)"
|
||||||
|
echo -e "\t\t\t IMPORTANT: if the path include spaces, wrap the entire argument in quotes."
|
||||||
|
echo -e "\t-l, \t\t Choose your Firefox profile from a list"
|
||||||
|
echo -e "\t-u,\t\t Update updater.sh and execute silently. Do not seek confirmation."
|
||||||
|
echo -e "\t-d,\t\t Do not look for updates to updater.sh."
|
||||||
|
echo -e "\t-s,\t\t Silently update user.js. Do not seek confirmation."
|
||||||
|
echo -e "\t-b,\t\t Only keep one backup of each file."
|
||||||
|
echo -e "\t-c,\t\t Create a diff file comparing old and new user.js within userjs_diffs. "
|
||||||
|
echo -e "\t-o OVERRIDE,\t Filename or path to overrides file (if different than user-overrides.js)."
|
||||||
|
echo -e "\t\t\t If used with -p, paths should be relative to PROFILE or absolute paths"
|
||||||
|
echo -e "\t\t\t If given a directory, all files inside will be appended recursively."
|
||||||
|
echo -e "\t\t\t You can pass multiple files or directories by passing a comma separated list."
|
||||||
|
echo -e "\t\t\t\t Note: If a directory is given, only files inside ending in the extension .js are appended"
|
||||||
|
echo -e "\t\t\t\t IMPORTANT: do not add spaces between files/paths. Ex: -o file1.js,file2.js,dir1"
|
||||||
|
echo -e "\t\t\t\t IMPORTANT: if any files/paths include spaces, wrap the entire argument in quotes."
|
||||||
|
echo -e "\t\t\t\t\t Ex: -o \"override folder\" "
|
||||||
|
echo -e "\t-n,\t\t Do not append any overrides, even if user-overrides.js exists."
|
||||||
|
echo -e "\t-v,\t\t Open the resulting user.js file."
|
||||||
|
echo -e "\t-r,\t\t Only download user.js to a temporary file and open it."
|
||||||
|
echo -e "\t-e,\t\t Activate ESR related preferences."
|
||||||
|
echo -e
|
||||||
|
echo 'Deprecated Arguments (they still work for now):'
|
||||||
|
echo -e "\t-donotupdate,\t Use instead -d"
|
||||||
|
echo -e "\t-update,\t Use instead -u"
|
||||||
|
echo -e
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
legacy_argument () {
|
||||||
|
echo -e "${ORANGE}\nWarning: command line arguments have changed."
|
||||||
|
echo -e "$1 has been deprecated and may not work in the future.\n"
|
||||||
|
echo -e "Please view the new options using the -h argument.${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# File Handling #
|
||||||
|
#########################
|
||||||
|
|
||||||
|
# Download files
|
||||||
|
download_file () {
|
||||||
|
declare -r url=$1
|
||||||
|
declare -r tf=$(mktemp)
|
||||||
|
local dlcmd=''
|
||||||
|
|
||||||
|
if [ $DOWNLOAD_METHOD = 'curl' ]; then
|
||||||
|
dlcmd="curl -o $tf"
|
||||||
|
else
|
||||||
|
dlcmd="wget -O $tf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# download latest ghacks user.js
|
$dlcmd "${url}" &>/dev/null && echo "$tf" || echo '' # return the temp-filename (or empty string on error)
|
||||||
echo "downloading latest ghacks user.js file"
|
}
|
||||||
curl -O ${ghacksjs} && echo "ghacks user.js has been downloaded"
|
|
||||||
|
|
||||||
if [ -e user-overrides.js ]; then
|
open_file () { #expects one argument: file_path
|
||||||
echo "user-overrides.js file found"
|
if [ "$(uname)" == 'Darwin' ]; then
|
||||||
cat user-overrides.js >> user.js && echo "user-overrides.js has been appended to user.js"
|
open "$1"
|
||||||
|
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
|
||||||
|
xdg-open "$1"
|
||||||
|
else
|
||||||
|
echo -e "${RED}Error: Sorry, opening files is not supported for your OS.${NC}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
readIniFile () { # expects one argument: absolute path of profiles.ini
|
||||||
|
declare -r inifile="$1"
|
||||||
|
declare -r tfile=$(mktemp)
|
||||||
|
|
||||||
|
if [ $(grep '^\[Profile' "$inifile" | wc -l) == "1" ]; then ### only 1 profile found
|
||||||
|
grep '^\[Profile' -A 4 "$inifile" | grep -v '^\[Profile' > $tfile
|
||||||
|
else
|
||||||
|
grep -E -v '^\[General\]|^StartWithLastProfile=|^IsRelative=' "$inifile"
|
||||||
|
echo ''
|
||||||
|
read -p 'Select the profile number ( 0 for Profile0, 1 for Profile1, etc ) : ' -r
|
||||||
|
echo -e "\n"
|
||||||
|
if [[ $REPLY =~ ^(0|[1-9][0-9]*)$ ]]; then
|
||||||
|
grep '^\[Profile'${REPLY} -A 4 "$inifile" | grep -v '^\[Profile'${REPLY} > $tfile
|
||||||
|
if [[ "$?" != "0" ]]; then
|
||||||
|
echo "Profile${REPLY} does not exist!" && exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Invalid selection!" && exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
declare -r profpath=$(grep '^Path=' $tfile)
|
||||||
|
declare -r pathisrel=$(grep '^IsRelative=' $tfile)
|
||||||
|
|
||||||
|
rm "$tfile"
|
||||||
|
|
||||||
|
# update global variable
|
||||||
|
if [[ ${pathisrel#*=} == "1" ]]; then
|
||||||
|
PROFILE_PATH="$(dirname "$inifile")/${profpath#*=}"
|
||||||
|
else
|
||||||
|
PROFILE_PATH="${profpath#*=}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
getProfilePath () {
|
||||||
|
declare -r f1=~/Library/Application\ Support/Firefox/profiles.ini
|
||||||
|
declare -r f2=~/.mozilla/firefox/profiles.ini
|
||||||
|
|
||||||
|
if [ "$PROFILE_PATH" = false ]; then
|
||||||
|
PROFILE_PATH="$SCRIPT_DIR"
|
||||||
|
elif [ "$PROFILE_PATH" = 'list' ]; then
|
||||||
|
local ini=''
|
||||||
|
if [[ -f "$f1" ]]; then
|
||||||
|
ini="$f1"
|
||||||
|
elif [[ -f "$f2" ]]; then
|
||||||
|
ini="$f2"
|
||||||
|
else
|
||||||
|
echo -e "${RED}Error: Sorry, -l is not supported for your OS${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
readIniFile "$ini" # updates PROFILE_PATH or exits on error
|
||||||
|
#else
|
||||||
|
# PROFILE_PATH already set by user with -p
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Update updater.sh #
|
||||||
|
#########################
|
||||||
|
|
||||||
|
# Returns the version number of a updater.sh file
|
||||||
|
get_updater_version () {
|
||||||
|
echo $(sed -n '5 s/.*[[:blank:]]\([[:digit:]]*\.[[:digit:]]*\)/\1/p' "$1")
|
||||||
|
}
|
||||||
|
|
||||||
|
# Update updater.sh
|
||||||
|
# Default: Check for update, if available, ask user if they want to execute it
|
||||||
|
# Args:
|
||||||
|
# -donotupdate: New version will not be looked for and update will not occur
|
||||||
|
# -update: Check for update, if available, execute without asking
|
||||||
|
update_updater () {
|
||||||
|
if [ $UPDATE = 'no' ]; then
|
||||||
|
return 0 # User signified not to check for updates
|
||||||
|
fi
|
||||||
|
|
||||||
|
declare -r tmpfile=$(download_file 'https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/updater.sh')
|
||||||
|
|
||||||
|
if [[ $(get_updater_version "${SCRIPT_DIR}/updater.sh") < $(get_updater_version "${tmpfile}") ]]; then
|
||||||
|
if [ $UPDATE = 'check' ]; then
|
||||||
|
echo -e "There is a newer version of updater.sh available. ${RED}Update and execute Y/N?${NC}"
|
||||||
|
read -p "" -n 1 -r
|
||||||
|
echo -e "\n\n"
|
||||||
|
if [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||||
|
return 0 # Update available, but user chooses not to update
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
return 0 # No update available
|
||||||
|
fi
|
||||||
|
mv "${tmpfile}" "${SCRIPT_DIR}/updater.sh"
|
||||||
|
chmod u+x "${SCRIPT_DIR}/updater.sh"
|
||||||
|
"${SCRIPT_DIR}/updater.sh" "$@" -d
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Update user.js #
|
||||||
|
#########################
|
||||||
|
|
||||||
|
# Returns version number of a user.js file
|
||||||
|
get_userjs_version () {
|
||||||
|
if [ -e $1 ]; then
|
||||||
|
echo "$(sed -n '4p' "$1")"
|
||||||
|
else
|
||||||
|
echo "Not detected."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
add_override () {
|
||||||
|
input=$1
|
||||||
|
if [ -f "$input" ]; then
|
||||||
|
echo "" >> user.js
|
||||||
|
cat "$input" >> user.js
|
||||||
|
echo -e "Status: ${GREEN}Override file appended:${NC} ${input}"
|
||||||
|
elif [ -d "$input" ]; then
|
||||||
|
FSAVEIFS=$IFS
|
||||||
|
IFS=$'\n\b' # Set IFS
|
||||||
|
FILES="${input}"/*.js
|
||||||
|
for f in $FILES
|
||||||
|
do
|
||||||
|
add_override "$f"
|
||||||
|
done
|
||||||
|
IFS=$SAVEIFS # restore $IFS
|
||||||
|
else
|
||||||
|
echo -e "${ORANGE}Warning: Could not find override file:${NC} ${input}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_comments () { # expects 2 arguments: from-file and to-file
|
||||||
|
sed -e 's/^[[:space:]]*\/\/.*$//' -e '/^\/\*/,/\*\//d' -e '/^[[:space:]]*$/d' -e 's/);[[:space:]]*\/\/.*/);/' "$1" > "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Applies latest version of user.js and any custom overrides
|
||||||
|
update_userjs () {
|
||||||
|
declare -r newfile=$(download_file 'https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js')
|
||||||
|
|
||||||
|
echo 'Please observe the following information:'
|
||||||
|
echo -e "\tFirefox profile: ${ORANGE}$(pwd)${NC}"
|
||||||
|
echo -e "\tAvailable online: ${ORANGE}$(get_userjs_version $newfile)${NC}"
|
||||||
|
echo -e "\tCurrently using: ${ORANGE}$(get_userjs_version user.js)\n${NC}\n"
|
||||||
|
|
||||||
|
if [ $CONFIRM = 'yes' ]; then
|
||||||
|
echo -e "This script will update to the latest user.js file and append any custom configurations from user-overrides.js. ${RED}Continue Y/N? ${NC}"
|
||||||
|
read -p "" -n 1 -r
|
||||||
|
echo -e "\n"
|
||||||
|
if [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||||
|
echo -e "${RED}Process aborted${NC}"
|
||||||
|
rm $newfile
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy a version of user.js to diffs folder for later comparison
|
||||||
|
if [ "$COMPARE" = true ]; then
|
||||||
|
mkdir -p userjs_diffs
|
||||||
|
cp user.js userjs_diffs/past_user.js &>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
# backup user.js
|
||||||
|
mkdir -p userjs_backups
|
||||||
|
local bakname="userjs_backups/user.js.backup.$(date +"%Y-%m-%d_%H%M")"
|
||||||
|
if [ $BACKUP = 'single' ]; then
|
||||||
|
bakname='userjs_backups/user.js.backup'
|
||||||
|
fi
|
||||||
|
cp user.js "$bakname" &>/dev/null
|
||||||
|
|
||||||
|
mv "${newfile}" user.js
|
||||||
|
echo -e "Status: ${GREEN}user.js has been backed up and replaced with the latest version!${NC}"
|
||||||
|
|
||||||
|
if [ "$ESR" = true ]; then
|
||||||
|
sed -e 's/\/\* \(ESR[0-9]\{2,\}\.x still uses all.*\)/\/\/ \1/' user.js > user.js.tmp && mv user.js.tmp user.js
|
||||||
|
echo -e "Status: ${GREEN}ESR related preferences have been activated!${NC}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# apply overrides
|
||||||
|
if [ "$SKIPOVERRIDE" = false ]; then
|
||||||
|
while IFS=',' read -ra FILE; do
|
||||||
|
add_override "$FILE"
|
||||||
|
done <<< "$OVERRIDE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create diff
|
||||||
|
if [ "$COMPARE" = true ]; then
|
||||||
|
pastuserjs='userjs_diffs/past_user.js'
|
||||||
|
past_nocomments='userjs_diffs/past_userjs.txt'
|
||||||
|
current_nocomments='userjs_diffs/current_userjs.txt'
|
||||||
|
|
||||||
|
remove_comments $pastuserjs $past_nocomments
|
||||||
|
remove_comments user.js $current_nocomments
|
||||||
|
|
||||||
|
diffname="userjs_diffs/diff_$(date +"%Y-%m-%d_%H%M").txt"
|
||||||
|
diff=$(diff -w -B -U 0 $past_nocomments $current_nocomments)
|
||||||
|
if [ ! -z "$diff" ]; then
|
||||||
|
echo "$diff" > "$diffname"
|
||||||
|
echo -e "Status: ${GREEN}A diff file was created:${NC} ${PWD}/${diffname}"
|
||||||
|
else
|
||||||
|
echo -e "Warning: ${ORANGE}Your new user.js file appears to be identical. No diff file was created.${NC}"
|
||||||
|
if [ $BACKUP = 'multiple' ]; then
|
||||||
|
rm $bakname &>/dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
rm $past_nocomments $current_nocomments $pastuserjs &>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$VIEW" = true ]; then open_file "${PWD}/user.js"; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Execute #
|
||||||
|
#########################
|
||||||
|
|
||||||
|
if [ $# != 0 ]; then
|
||||||
|
readonly legacy_lc=$(echo $1 | tr '[A-Z]' '[a-z]')
|
||||||
|
# Display usage if first argument is -help or --help
|
||||||
|
if [ $1 = '--help' ] || [ $1 = '-help' ]; then
|
||||||
|
usage
|
||||||
|
elif [ $legacy_lc = '-donotupdate' ]; then
|
||||||
|
UPDATE='no'
|
||||||
|
legacy_argument $1
|
||||||
|
elif [ $legacy_lc = '-update' ]; then
|
||||||
|
UPDATE='yes'
|
||||||
|
legacy_argument $1
|
||||||
|
else
|
||||||
|
while getopts ":hp:ludsno:bcvre" opt; do
|
||||||
|
case $opt in
|
||||||
|
h)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
p)
|
||||||
|
PROFILE_PATH=${OPTARG}
|
||||||
|
;;
|
||||||
|
l)
|
||||||
|
PROFILE_PATH='list'
|
||||||
|
;;
|
||||||
|
u)
|
||||||
|
UPDATE='yes'
|
||||||
|
;;
|
||||||
|
d)
|
||||||
|
UPDATE='no'
|
||||||
|
;;
|
||||||
|
s)
|
||||||
|
CONFIRM='no'
|
||||||
|
;;
|
||||||
|
n)
|
||||||
|
SKIPOVERRIDE=true
|
||||||
|
;;
|
||||||
|
o)
|
||||||
|
OVERRIDE=${OPTARG}
|
||||||
|
;;
|
||||||
|
b)
|
||||||
|
BACKUP='single'
|
||||||
|
;;
|
||||||
|
c)
|
||||||
|
COMPARE=true
|
||||||
|
;;
|
||||||
|
v)
|
||||||
|
VIEW=true
|
||||||
|
;;
|
||||||
|
e)
|
||||||
|
ESR=true
|
||||||
|
;;
|
||||||
|
r)
|
||||||
|
tfile=$(download_file 'https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js')
|
||||||
|
mv $tfile "${tfile}.js"
|
||||||
|
echo -e "${ORANGE}Warning: user.js was saved to temporary file ${tfile}.js${NC}"
|
||||||
|
open_file "${tfile}.js"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
\?)
|
||||||
|
echo -e "${RED}\n Error! Invalid option: -$OPTARG${NC}" >&2
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
:)
|
||||||
|
echo -e "${RED}Error! Option -$OPTARG requires an argument.${NC}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "Process aborted"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## change directory back to the original working directory
|
show_banner
|
||||||
cd "${currdir}"
|
update_updater $@
|
||||||
|
|
||||||
|
getProfilePath # updates PROFILE_PATH or exits on error
|
||||||
|
cd "$PROFILE_PATH" && update_userjs
|
||||||
|
|
||||||
|
cd "$CURRDIR"
|
||||||
|
1
wikipiki/License-MIT-yellow.svg
Normal file
1
wikipiki/License-MIT-yellow.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="78" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="78" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h47v20H0z"/><path fill="#dfb317" d="M47 0h31v20H47z"/><path fill="url(#b)" d="M0 0h78v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="245" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="370">license</text><text x="245" y="140" transform="scale(.1)" textLength="370">license</text><text x="615" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="210">MIT</text><text x="615" y="140" transform="scale(.1)" textLength="210">MIT</text></g> </svg>
|
After Width: | Height: | Size: 950 B |
Reference in New Issue
Block a user