From d6c82c73b4702737ccf5b0b498b9546faec393f4 Mon Sep 17 00:00:00 2001 From: Thorin-Oakenpants Date: Sat, 29 Jan 2022 05:44:33 +0000 Subject: [PATCH] Created 3.1 Overrides (markdown) --- 3.1-Overrides.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 3.1-Overrides.md diff --git a/3.1-Overrides.md b/3.1-Overrides.md new file mode 100644 index 0000000..2ce030f --- /dev/null +++ b/3.1-Overrides.md @@ -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 1 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 +``` + +1 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])