firefox-user.js/scratchpad-scripts/arkenfox-cleanup.js

132 lines
4.7 KiB
JavaScript
Raw Normal View History

2020-07-23 07:00:23 -04:00
/***
2023-09-18 04:34:35 -04:00
This will reset the preferences that since FF91 have been
2021-12-11 04:37:45 -05:00
- removed from the arkenfox user.js
- deprecated by Mozilla but listed in the arkenfox user.js in the past
2020-07-23 07:00:23 -04:00
2023-09-18 04:31:22 -04:00
Last updated: 18-September-2023
2020-07-23 07:00:23 -04:00
2021-12-11 04:37:45 -05:00
Instructions:
- [optional] close Firefox and backup your profile
- [optional] disable your network connection [1]
- start Firefox
- load about:config and press Ctrl+Shift+K to open the Web Console for about:config
- using about:config is important, so the script has the right permissions
- paste this script
- if you edited the list of prefs in the script, make sure the last pref does not have a trailing comma
- hit enter
- check the Info output to see which prefs were reset
- restart
- some prefs require a restart
- a restart will reapply your user.js
- [optional] re-enable your network connection
[1] Blocking Firefox from the internet ensures it cannot act on your reset preferences in the
period before you restart it, such as app and extension auto-updating, or downloading unwanted
components (GMP etc). It depends on what you're resetting and how long before you restart.
2020-07-23 07:00:23 -04:00
***/
2021-07-07 10:25:08 -04:00
(() => {
if ('undefined' === typeof(Services)) return alert('about:config needs to be the active tab!');
const aPREFS = [
2021-12-11 04:13:09 -05:00
/* DEPRECATED */
/* 116-128 */
2023-09-16 03:08:33 -04:00
'dom.webnotifications.serviceworker.enabled', // 117
'layout.css.font-visibility.resistFingerprinting', // 116
2023-09-18 04:31:22 -04:00
'permissions.delegation.enabled', // 118
2023-09-16 03:08:33 -04:00
'security.family_safety.mode', // 117
2023-07-10 09:35:52 -04:00
/* 103-115 */
'browser.cache.offline.enable', // 115
'extensions.formautofill.heuristics.enabled', // 114
'network.cookie.lifetimePolicy', // 103 [technically removed in 104]
2023-06-20 23:29:51 -04:00
'privacy.clearsitedata.cache.enabled', // 114
'privacy.resistFingerprinting.testGranularityMask', // 114
2022-07-31 06:50:24 -04:00
'security.pki.sha1_enforcement_level', // 103
2022-06-01 09:51:19 -04:00
/* 92-102 */
2021-12-11 04:13:09 -05:00
'browser.urlbar.suggest.quicksuggest', // 95
'dom.securecontext.whitelist_onions', // 97
2022-06-14 03:01:01 -04:00
'dom.storage.next_gen', // 102
'network.http.spdy.enabled', // 100
'network.http.spdy.enabled.deps',
'network.http.spdy.enabled.http2',
'network.http.spdy.websockets',
2021-12-11 04:13:09 -05:00
'layout.css.font-visibility.level', // 94
'security.ask_for_password', // 102
'security.csp.enable', // 99
'security.password_lifetime', // 102
2021-12-11 04:13:09 -05:00
'security.ssl3.rsa_des_ede3_sha', // 93
/* REMOVED */
/* 116-128 */
'browser.fixup.alternate.enabled',
'browser.urlbar.dnsResolveSingleWordsAfterSearch',
'media.gmp-widevinecdm.enabled',
2023-08-13 23:27:30 -04:00
'network.protocol-handler.external.ms-windows-store',
'privacy.partition.always_partition_third_party_non_cookie_storage',
'privacy.partition.always_partition_third_party_non_cookie_storage.exempt_sessionstorage',
'privacy.partition.serviceWorkers',
2023-07-19 16:38:31 -04:00
/* 103-115 */
2022-11-28 03:11:40 -05:00
'beacon.enabled',
2023-01-26 20:07:25 -05:00
'browser.startup.blankWindow',
2022-10-03 03:18:30 -04:00
'browser.newtab.preload',
'browser.newtabpage.activity-stream.feeds.discoverystreamfeed',
2022-10-01 16:33:58 -04:00
'browser.newtabpage.activity-stream.feeds.snippets',
2022-12-02 05:19:29 -05:00
'browser.region.network.url',
'browser.region.update.enabled',
'browser.search.region',
'browser.ssl_override_behavior',
'browser.tabs.warnOnClose',
'devtools.chrome.enabled',
2022-11-04 12:03:29 -04:00
'dom.disable_beforeunload',
'dom.disable_open_during_load',
'dom.netinfo.enabled',
'dom.vr.enabled',
'extensions.formautofill.addresses.supported',
'extensions.formautofill.available',
'extensions.formautofill.creditCards.available',
'extensions.formautofill.creditCards.supported',
2023-07-19 16:38:31 -04:00
'middlemouse.contentLoadURL',
'network.http.altsvc.oe',
2022-06-01 09:51:19 -04:00
/* 92-102 */
2022-06-12 08:45:13 -04:00
'browser.urlbar.trimURLs',
'dom.caches.enabled',
'dom.storageManager.enabled',
'dom.storage_access.enabled',
'dom.targetBlankNoOpener.enabled',
2022-06-01 09:51:19 -04:00
'network.cookie.thirdparty.sessionOnly',
'network.cookie.thirdparty.nonsecureSessionOnly',
2021-12-09 07:31:38 -05:00
'privacy.firstparty.isolate.block_post_message',
'privacy.firstparty.isolate.restrict_opener_access',
'privacy.firstparty.isolate.use_site',
'privacy.window.name.update.enabled',
'security.insecure_connection_text.enabled',
2021-12-11 04:37:45 -05:00
/* IMPORTANT: last active pref must not have a trailing comma */
2020-07-23 07:00:23 -04:00
/* reset parrot: check your open about:config after running the script */
'_user.js.parrot'
2021-07-07 10:25:08 -04:00
];
console.clear();
2020-07-23 07:00:23 -04:00
let c = 0;
2021-07-07 10:25:08 -04:00
for (const sPname of aPREFS) {
if (Services.prefs.prefHasUserValue(sPname)) {
Services.prefs.clearUserPref(sPname);
if (!Services.prefs.prefHasUserValue(sPname)) {
console.info('reset', sPname);
2020-07-23 07:00:23 -04:00
c++;
2021-07-07 10:25:08 -04:00
} else console.warn('failed to reset', sPname);
2020-07-23 07:00:23 -04:00
}
}
2021-07-07 10:25:08 -04:00
2020-07-23 07:00:23 -04:00
focus();
2021-07-07 10:25:08 -04:00
const d = (c==1) ? ' pref' : ' prefs';
alert(c ? 'successfully reset ' + c + d + "\n\nfor details check the console" : 'nothing to reset');
return 'all done';
2020-07-23 07:00:23 -04:00
})();