diff --git a/3.1-Resetting-Inactive-Prefs-[Scripts].md b/3.1-Resetting-Inactive-Prefs-[Scripts].md index e6ffd87..898c5de 100644 --- a/3.1-Resetting-Inactive-Prefs-[Scripts].md +++ b/3.1-Resetting-Inactive-Prefs-[Scripts].md @@ -44,64 +44,3 @@ The solution is simple. Automate it, and reset **every single pref** in the user * A restart will reapply your `user.js` * Re-enable the network connection -### :small_orange_diamond: Script Example - -* The script only resets prefs if they are `user set`/`modified` -* The sample script below contains the prefs we REMOVED in v52-to-57 - -```js -(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"); } - -})(); -``` -