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

141 lines
5.1 KiB
JavaScript
Raw Normal View History

2020-07-23 11:00:23 +00:00
/***
2023-09-18 08:34:35 +00:00
This will reset the preferences that since FF91 have been
2021-12-11 09:37:45 +00:00
- removed from the arkenfox user.js
- deprecated by Mozilla but listed in the arkenfox user.js in the past
2020-07-23 11:00:23 +00:00
There is an archived version at https://github.com/arkenfox/user.js/issues/123
2023-11-19 09:56:47 +00:00
if you want the full list since jesus
2023-09-21 12:36:35 +00:00
Last updated: 2-November-2023
2020-07-23 11:00:23 +00:00
2021-12-11 09:37:45 +00: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 11:00:23 +00:00
***/
2021-07-07 14:25:08 +00:00
(() => {
if ('undefined' === typeof(Services)) return alert('about:config needs to be the active tab!');
const aPREFS = [
2021-12-11 09:13:09 +00:00
/* DEPRECATED */
/* 116-128 */
2023-09-16 07:08:33 +00:00
'dom.webnotifications.serviceworker.enabled', // 117
'javascript.use_us_english_locale', // 119
2023-09-29 10:52:55 +00:00
'layout.css.font-visibility.private', // 118
'layout.css.font-visibility.resistFingerprinting', // 116
2023-09-29 10:52:55 +00:00
'layout.css.font-visibility.standard', // 118
'layout.css.font-visibility.trackingprotection', // 118
'network.dns.skipTRR-when-parental-control-enabled', // 119
2023-09-18 08:31:22 +00:00
'permissions.delegation.enabled', // 118
2023-09-16 07:08:33 +00:00
'security.family_safety.mode', // 117
2023-07-10 13:35:52 +00:00
/* 103-115 */
'browser.cache.offline.enable', // 115
'extensions.formautofill.heuristics.enabled', // 114
'network.cookie.lifetimePolicy', // 103 [technically removed in 104]
2023-06-21 03:29:51 +00:00
'privacy.clearsitedata.cache.enabled', // 114
'privacy.resistFingerprinting.testGranularityMask', // 114
2022-07-31 10:50:24 +00:00
'security.pki.sha1_enforcement_level', // 103
2022-06-01 13:51:19 +00:00
/* 92-102 */
2021-12-11 09:13:09 +00:00
'browser.urlbar.suggest.quicksuggest', // 95
'dom.securecontext.whitelist_onions', // 97
2022-06-14 07:01:01 +00: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 09:13:09 +00:00
'layout.css.font-visibility.level', // 94
'security.ask_for_password', // 102
'security.csp.enable', // 99
'security.password_lifetime', // 102
2021-12-11 09:13:09 +00:00
'security.ssl3.rsa_des_ede3_sha', // 93
/* REMOVED */
/* 116-128 */
'browser.fixup.alternate.enabled',
'browser.taskbar.previews.enable',
'browser.urlbar.dnsResolveSingleWordsAfterSearch',
'media.gmp-widevinecdm.enabled',
2023-08-14 03:27:30 +00: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 20:38:31 +00:00
/* 103-115 */
2022-11-28 08:11:40 +00:00
'beacon.enabled',
2023-01-27 01:07:25 +00:00
'browser.startup.blankWindow',
2022-10-03 07:18:30 +00:00
'browser.newtab.preload',
'browser.newtabpage.activity-stream.feeds.discoverystreamfeed',
2022-10-01 20:33:58 +00:00
'browser.newtabpage.activity-stream.feeds.snippets',
2022-12-02 10:19:29 +00: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 16:03:29 +00: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 20:38:31 +00:00
'middlemouse.contentLoadURL',
'network.http.altsvc.oe',
2022-06-01 13:51:19 +00:00
/* 92-102 */
2022-06-12 12:45:13 +00:00
'browser.urlbar.trimURLs',
'dom.caches.enabled',
'dom.storageManager.enabled',
'dom.storage_access.enabled',
'dom.targetBlankNoOpener.enabled',
2022-06-01 13:51:19 +00:00
'network.cookie.thirdparty.sessionOnly',
'network.cookie.thirdparty.nonsecureSessionOnly',
2021-12-09 12:31:38 +00: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 09:37:45 +00:00
/* IMPORTANT: last active pref must not have a trailing comma */
2020-07-23 11:00:23 +00:00
/* reset parrot: check your open about:config after running the script */
'_user.js.parrot'
2021-07-07 14:25:08 +00:00
];
console.clear();
2020-07-23 11:00:23 +00:00
let c = 0;
2021-07-07 14:25:08 +00: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 11:00:23 +00:00
c++;
2021-07-07 14:25:08 +00:00
} else console.warn('failed to reset', sPname);
2020-07-23 11:00:23 +00:00
}
}
2021-07-07 14:25:08 +00:00
2020-07-23 11:00:23 +00:00
focus();
2021-07-07 14:25:08 +00: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 11:00:23 +00:00
})();