Updated 3.1 Resetting Inactive Prefs [Scripts] (markdown)

earthlng 2018-04-24 17:33:27 +02:00
parent 051b4be43e
commit 80b9cb7abf

@ -1,6 +1,4 @@
:exclamation: Read the instructions, back up your profile, and use at your own risk (although we have thoroughly tested them!).
- Our scratchpad scripts are stored [here](https://github.com/ghacksuserjs/ghacks-user.js/tree/master/scratchpad-scripts)
- Our `prefsCleaner.bat` file is [here](https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/prefsCleaner.bat)
### :small_orange_diamond: The Issue
@ -14,31 +12,49 @@ So the issue is :question: How do you make sure all the INACTIVE/REMOVED prefs i
The solution is simple. Automate it, and reset **every single pref** in the user.js regardless of whether it is active or inactive. Then restart Firefox and all your ACTIVE prefs are reapplied. The end result being all your INACTIVE ones have been reset.
> :small_blue_diamond: prefsCleaner.bat
>
> Run the [prefsCleaner.bat](https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/prefsCleaner.bat) file in your profile directory with Firefox closed. This does not cover prefs we REMOVED from the `ghacks user.js`, see the Scratchpad section for those.
>
> ** Special thanks to [claustromaniac](https://github.com/claustromaniac) and [earthlng](https://github.com/earthlng) for all the hard work creating and testing this
And that's exactly what our **prefsCleaner** script does.
> :small_blue_diamond: Scratchpad Scripts (based on `ghacks user.js`)
>
> You can run our [scratchpad scripts](https://github.com/ghacksuserjs/ghacks-user.js/tree/master/scratchpad-scripts), which we have broken down into a handful of smaller, more relevant scripts.
>
> The REMOVED script is the ONLY single point of reference for everything we once tinkered with, but is now gone. It's a short list, but highly recommended that you manually check them or run the script.
---
### :small_orange_diamond: How To Run A Scratchpad Script
**WARNING:** If you changed any prefs that are INACTIVE in the user.js **manually** in about:config or the Options then those will get reset too! (for example `browser.startup.homepage`)
For a less risky solution use some of our scratchpad scripts which we have broken down into a number of smaller scripts. But depending on which ones you run the same warning applies!
Think of it as an opportunity to increase your automation by setting those manually controlled settings in your user.js (or append them to your `user-overrides.js` file if you use our [Updater Scripts](https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.3-Updater-Scripts)).
---
#### :small_blue_diamond: prefsCleaner
Download the prefsCleaner [for Windows](https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/prefsCleaner.bat) or [for Linux/Mac](https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/prefsCleaner.sh) and **run it in your profile directory with Firefox closed**.
NOTE: This does not cover prefs we REMOVED from the `ghacks user.js`, see the Scratchpad section for those.
---
:small_blue_diamond: **Scratchpad Scripts** (based on `ghacks user.js`)
Our scratchpad scripts (`ghacks-clear-*.js`) are stored [here](https://github.com/ghacksuserjs/ghacks-user.js/tree/master/scratchpad-scripts).
The REMOVED script is the ONLY single point of reference for everything we once tinkered with, but is now gone. It's a short list, but highly recommended that you manually check them or run the script.
**How To Run A Scratchpad Script**
* Close Firefox and [backup](https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.2-Backing-Up) your profile
* (Optional) Disable the network connection <sup>1</sup>
* Start Firefox and open `about:config` (so that Services is available for scratchpad)
* Start Firefox
* Open the Developer>Browser Console>Logging for any output
* the script will list every pref it resets in the console
* it only resets prefs if they are `user set`/ `modified`
* Load `about:config` (so that Services is available for scratchpad)
* Read that again :exclamation: the `about:config` tab must have focus in order to run the script
* Press Shift+F4 to open the Scratchpad and clear the contents
* Open **your** script (`.js` file) or paste it
* If pasting is not allowed, change `devtools.selfxss.count` to a high number e.g. `100`
* Make sure the last pref does not have a trailing comma
* If you edited the list of prefs in the script, make sure the last pref does **not** have a trailing comma
* Run it
* Open the Developer>Browser Console>Logging for any output
* The script only resets prefs if they are `user set`/ `modified`
* Check the console to see which prefs were reset
* if you see something you want to keep, add it to your user.js (or your overrides)
* Restart Firefox
* Some prefs require a restart
* A restart will reapply your `user.js`