mirror of
https://github.com/arkenfox/user.js.git
synced 2024-11-26 04:21:39 +01:00
Updated 1.6 Bulk Pref Resetting [Scratchpad] (markdown)
parent
d37ecd7502
commit
6a4c671da3
@ -51,6 +51,51 @@ The **sample** script below contains the prefs we have REMOVED up to Release 55-
|
|||||||
Authors: [earthlng](https://github.com/earthlng)
|
Authors: [earthlng](https://github.com/earthlng)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
placeholder
|
(function() {
|
||||||
|
let ops = [
|
||||||
|
'_user.js.parrot'
|
||||||
|
/* removed in ghacks user.js v52-55 */
|
||||||
|
/* 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
|
||||||
|
]
|
||||||
|
|
||||||
|
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"); }
|
||||||
|
|
||||||
|
})();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user