mirror of
https://github.com/arkenfox/user.js.git
synced 2024-11-22 18:41:38 +01:00
Created 3.1 Overrides (markdown)
parent
1719f78617
commit
d6c82c73b4
36
3.1-Overrides.md
Normal file
36
3.1-Overrides.md
Normal file
@ -0,0 +1,36 @@
|
||||
🟩 Previous: [Backup](https://github.com/arkenfox/user.js/wiki/2.2-Backup)
|
||||
|
||||
🟥 Summary: **Everyone will need some "overrides" in a `user-overrides.js`**. Directly modifying arkenfox's contents is not recommended
|
||||
|
||||
---
|
||||
|
||||
Arkenfox flips 140+ prefs. With that, you will get some inconvenience and breakage. Everybody's mileage and threat model will differ - **EVERYONE** will need some "overrides". You do this by keeping them in a separate `user-overrides.js` file in your profile folder, so updating doesn't wipe them but instead appends them.
|
||||
|
||||
Remember how a user.js applies prefs in the order they are written? So if a pref was listed a second time, then the second value (yours) would override the first (arkenfox's)
|
||||
|
||||
🔹 user.js (live arkenfox)
|
||||
```js
|
||||
user_pref("pref.name.example", "purple")
|
||||
```
|
||||
|
||||
🔹 user-overrides.js (you create this file)
|
||||
```js
|
||||
// my overrides
|
||||
user_pref("pref.name.example", "green") // I like green
|
||||
```
|
||||
|
||||
The updater gets the current live arkenfox <sup>1</sup> and appends your overrides, and then it compares that to the current user.js in your profile. If it's different, it replaces it. In this example, Firefox will apply the value of `green` when Firefox is started
|
||||
|
||||
🔹 user.js (yours after updater runs)
|
||||
```js
|
||||
user_pref("pref.name.example", "purple")
|
||||
|
||||
// my overrides
|
||||
user_pref("pref.name.example", "green") // I like green
|
||||
```
|
||||
|
||||
<sup>1</sup> Starting with v97, arkenfox changes to the live master will happen once per release: all changes will be done in a separate branch and only merged when finished
|
||||
|
||||
---
|
||||
|
||||
🟩 Next: [Overrides [Common]](https://github.com/arkenfox/user.js/wiki/3.2-Overrides-[Common])
|
Loading…
Reference in New Issue
Block a user