mirror of
https://github.com/arkenfox/user.js.git
synced 2025-02-23 19:03:56 +00:00
Update arkenfox-clear-removed.js
This commit is contained in:
parent
3b573bf9f0
commit
939d75e5eb
@ -1,14 +1,17 @@
|
|||||||
/***
|
/***
|
||||||
This will reset the preferences that have been removed completely from the arkenfox user.js.
|
This will reset the preferences that have been removed completely from the arkenfox user.js.
|
||||||
|
|
||||||
Last updated: 25-May-2021
|
Last updated: 25-May-2021
|
||||||
|
|
||||||
For instructions see:
|
For instructions see:
|
||||||
https://github.com/arkenfox/user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
https://github.com/arkenfox/user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
|
||||||
***/
|
***/
|
||||||
|
|
||||||
(function() {
|
(() => {
|
||||||
let ops = [
|
|
||||||
|
if ('undefined' === typeof(Services)) return alert('about:config needs to be the active tab!');
|
||||||
|
|
||||||
|
const aPREFS = [
|
||||||
/* removed in arkenfox user.js */
|
/* removed in arkenfox user.js */
|
||||||
/* 52-alpha */
|
/* 52-alpha */
|
||||||
'browser.search.reset.enabled',
|
'browser.search.reset.enabled',
|
||||||
@ -240,29 +243,26 @@
|
|||||||
'security.ssl.enable_ocsp_stapling',
|
'security.ssl.enable_ocsp_stapling',
|
||||||
/* reset parrot: check your open about:config after running the script */
|
/* reset parrot: check your open about:config after running the script */
|
||||||
'_user.js.parrot'
|
'_user.js.parrot'
|
||||||
]
|
];
|
||||||
|
|
||||||
|
console.clear();
|
||||||
|
|
||||||
if("undefined" === typeof(Services)) {
|
|
||||||
alert("about:config needs to be the active tab!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let c = 0;
|
let c = 0;
|
||||||
for (let i = 0, len = ops.length; i < len; i++) {
|
for (const sPname of aPREFS) {
|
||||||
if (Services.prefs.prefHasUserValue(ops[i])) {
|
if (Services.prefs.prefHasUserValue(sPname)) {
|
||||||
Services.prefs.clearUserPref(ops[i]);
|
Services.prefs.clearUserPref(sPname);
|
||||||
if (!Services.prefs.prefHasUserValue(ops[i])) {
|
if (!Services.prefs.prefHasUserValue(sPname)) {
|
||||||
console.log("reset", ops[i]);
|
console.info('reset', sPname);
|
||||||
c++;
|
c++;
|
||||||
} else { console.log("failed to reset", ops[i]); }
|
} else console.warn('failed to reset', sPname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
focus();
|
focus();
|
||||||
|
|
||||||
let d = (c==1) ? " pref" : " prefs";
|
const d = (c==1) ? ' pref' : ' prefs';
|
||||||
if (c > 0) {
|
alert(c ? 'successfully reset ' + c + d + "\n\nfor details check the console" : 'nothing to reset');
|
||||||
alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
|
|
||||||
} else { alert("nothing to reset"); }
|
return 'all done';
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user