mirror of
https://github.com/arkenfox/user.js.git
synced 2024-11-29 05:46:57 +01:00
Destroyed 3.2 Applying Your Changes (markdown)
parent
c13275f369
commit
d2a48192da
@ -1,91 +0,0 @@
|
|||||||
### :small_orange_diamond: The Issue
|
|
||||||
|
|
||||||
Keeping track of all **your** changes/additions and keeping up to date with all our changes is hard and problematic. We make a lot of changes - not just adding and deprecating preferences, or flipping them from active to inactive, or changing their values, but also making descriptions better, syntax tweaks, adding/removing references, and even whole section revamps and re-ordering. Doing a file comparison and re-applying your own changes is time consuming, prone to human error, and not really feasible for most people.
|
|
||||||
|
|
||||||
### :small_orange_diamond: The Solution
|
|
||||||
|
|
||||||
Keep your changes in a SEPARATE file as your master copy (see the example below), and manually append them to the end of the `user.js` when you ~~update~~ replace it with the latest version. This simplifies updating the `user.js`. Then all you have to do is follow our easy, succinct [changelogs](https://github.com/arkenfox/user.js/search?q=label%3Achangelog&type=Issues&utf8=?) to discover new items and changes.
|
|
||||||
|
|
||||||
We have created some [updater scripts](https://github.com/arkenfox/user.js/wiki/3.3-Updater-Scripts) to do all of this for you - i.e backup your `user.js`, create a new `user.js` using our current master, and append your overrides - BUT you need to follow our file naming convention.
|
|
||||||
|
|
||||||
Note the caveats below including having to manually reapply any one-char section switches if they differ from our master.
|
|
||||||
|
|
||||||
`PRO TIP` It is a good idea to add our parrot pref for troubleshooting (see example below)
|
|
||||||
|
|
||||||
> :small_blue_diamond: `user-overrides.js` [recommended]
|
|
||||||
>
|
|
||||||
> Create a `user-overrides.js` file in your profile directory. This acts as the master copy of all your tweaks, and our updater scripts will auto append its contents for you to the end of the `user.js` after it downloads the current `arkenfox user.js` master.
|
|
||||||
|
|
||||||
> :small_blue_diamond: `profile/preferences/*.js` [old method]
|
|
||||||
>
|
|
||||||
> Firefox 58+ no longer supports using `profile/preferences/xxx.js` - [1413413](https://bugzilla.mozilla.org/show_bug.cgi?id=1413413). In Firefox versions where this is supported, there is no need to append the contents to the `user.js` as they are applied last (after `user.js`) on a Firefox startup.
|
|
||||||
|
|
||||||
### :small_orange_diamond: Example
|
|
||||||
|
|
||||||
Lets say you would like to enable session restore
|
|
||||||
|
|
||||||
- In your `profile/user.js` (which is the arkenfox user.js) you have
|
|
||||||
```js
|
|
||||||
/* 0102: set START page (0=blank, 1=home, 2=last visited page, 3=resume previous session) ***/
|
|
||||||
user_pref("browser.startup.page", 0);
|
|
||||||
|
|
||||||
/* 2803: set what items to clear on shutdown ... ***/
|
|
||||||
user_pref("privacy.clearOnShutdown.cookies", true);
|
|
||||||
user_pref("privacy.clearOnShutdown.formdata", true); // Form & Search History
|
|
||||||
|
|
||||||
/* 2804: reset default items to clear with Ctrl-Shift-Del (to match 2803) ... ***/
|
|
||||||
user_pref("privacy.cpd.cookies", true);
|
|
||||||
user_pref("privacy.cpd.formdata", true); // Form & Search History
|
|
||||||
```
|
|
||||||
|
|
||||||
- In a `profile/user-overrides.js` you override them
|
|
||||||
- The example below is from our [override recipes](https://github.com/arkenfox/user.js/issues/1080), which you would modify to suit exactly what you need
|
|
||||||
|
|
||||||
```js
|
|
||||||
/*** MY OVERRIDES ***/
|
|
||||||
user_pref("_user.js.parrot", "overrides section syntax error");
|
|
||||||
|
|
||||||
/* override recipe: enable session restore ***/
|
|
||||||
user_pref("browser.startup.page", 3); // 0102
|
|
||||||
// user_pref("browser.privatebrowsing.autostart", false); // 0110 required if you had it set as true
|
|
||||||
// user_pref("places.history.enabled", true); // 0862 required if you had it set as false
|
|
||||||
// user_pref("browser.sessionstore.privacy_level", 0); // 1021 optional [to restore extras like cookies/formdata]
|
|
||||||
user_pref("privacy.clearOnShutdown.history", false); // 2803
|
|
||||||
// user_pref("privacy.clearOnShutdown.cookies", false); // 2803 optional
|
|
||||||
// user_pref("privacy.clearOnShutdown.formdata", false); // 2803 optional
|
|
||||||
user_pref("privacy.cpd.history", false); // 2804 to match when you use Ctrl-Shift-Del
|
|
||||||
// user_pref("privacy.cpd.cookies", false); // 2804 optional
|
|
||||||
// user_pref("privacy.cpd.formdata", false); // 2804 optional
|
|
||||||
|
|
||||||
user_pref("_user.js.parrot", "overrides section successful");
|
|
||||||
```
|
|
||||||
|
|
||||||
The next time you update the `profile/user.js` and replace it, all you have to do is append the contents of your existing tweaks from `profile/user-overrides.js`. Or if you use our updater scripts, it will do this manual step for you as well.
|
|
||||||
|
|
||||||
### :small_orange_diamond: Caveats
|
|
||||||
|
|
||||||
You will need to monitor your small set of overrides due to Firefox changes. Just keep an eye on things is all I'm saying
|
|
||||||
|
|
||||||
- One-Char Switches
|
|
||||||
* Several sections in the `user.js` have one-char switches to enable/disable the entire section (e.g. deprecated items by ESR version). You will have to remember to do these manually if required.
|
|
||||||
- Deprecated Items
|
|
||||||
* A deprecated item will not remove, or comment itself out in your override.js, you will have to do it manually (and reset in about:config to get rid of it, which you would need to do anyway). No harm, it will just not be a pref that does anything anymore.
|
|
||||||
- Changes to Default Values
|
|
||||||
* Example `user_pref("security.tls.version.min", 3);`
|
|
||||||
* You override it with the Firefox default value of `1`
|
|
||||||
* In the future Firefox changes their default to `2` due to security concerns, but now you're stuck with a value of `1` and you didn't pick up on it
|
|
||||||
- Hidden Pref Default Values
|
|
||||||
* Most hidden prefs seem to be boolean (true or false), so these shouldn't be an issue, but not all are. Here's one: `user_pref("extensions.enabledScopes", 1); // (hidden pref)`
|
|
||||||
* If you right-click and reset in about:config it simply clears itself. What is the default value? If you know it, that's great. If you don't...
|
|
||||||
* A solution here is to add a section to your override listing prefs to comment out in the user.js and reset in about:config. Just re-apply it on each update.
|
|
||||||
|
|
||||||
```js
|
|
||||||
/*** MY OVERRIDES ***/
|
|
||||||
user_pref("browser.startup.page", 3); // 0102 = session restore
|
|
||||||
user_pref("privacy.clearOnShutdown.history", false); // 2803 = session restore needs history
|
|
||||||
user_pref("privacy.cpd.history", false); // 2804 = don't manually clear history
|
|
||||||
|
|
||||||
/*** MAKE SURE THESE ARE COMMENTED OUT AND RESET ***/
|
|
||||||
// 2668: extensions.enabledScopes
|
|
||||||
```
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user