arkenfox-cleanup.js (5577B)
1 /*** 2 This will reset the preferences that since FF91 have been 3 - removed from the arkenfox user.js 4 - deprecated by Mozilla but listed in the arkenfox user.js in the past 5 6 There is an archived version at https://github.com/arkenfox/user.js/issues/123 7 if you want the full list since jesus 8 9 Last updated: 6-August-2024 10 11 Instructions: 12 - [optional] close Firefox and backup your profile 13 - [optional] disable your network connection [1] 14 - start Firefox 15 - load about:config and press Ctrl+Shift+K to open the Web Console for about:config 16 - using about:config is important, so the script has the right permissions 17 - paste this script 18 - if you edited the list of prefs in the script, make sure the last pref does not have a trailing comma 19 - hit enter 20 - check the Info output to see which prefs were reset 21 - restart 22 - some prefs require a restart 23 - a restart will reapply your user.js 24 - [optional] re-enable your network connection 25 26 [1] Blocking Firefox from the internet ensures it cannot act on your reset preferences in the 27 period before you restart it, such as app and extension auto-updating, or downloading unwanted 28 components (GMP etc). It depends on what you're resetting and how long before you restart. 29 30 ***/ 31 32 (() => { 33 34 if ('undefined' === typeof(Services)) return alert('about:config needs to be the active tab!'); 35 36 const aPREFS = [ 37 /* DEPRECATED */ 38 /* 116-128 */ 39 'browser.contentanalysis.default_allow', // 127 40 'browser.messaging-system.whatsNewPanel.enabled', // 126 41 'browser.ping-centre.telemetry', // 123 42 'dom.webnotifications.serviceworker.enabled', // 117 43 'javascript.use_us_english_locale', // 119 44 'layout.css.font-visibility.private', // 118 45 'layout.css.font-visibility.resistFingerprinting', // 116 46 'layout.css.font-visibility.standard', // 118 47 'layout.css.font-visibility.trackingprotection', // 118 48 'network.dns.skipTRR-when-parental-control-enabled', // 119 49 'permissions.delegation.enabled', // 118 50 'security.family_safety.mode', // 117 51 'widget.non-native-theme.enabled', // 127 52 /* 103-115 */ 53 'browser.cache.offline.enable', // 115 54 'extensions.formautofill.heuristics.enabled', // 114 55 'network.cookie.lifetimePolicy', // 103 [technically removed in 104] 56 'privacy.clearsitedata.cache.enabled', // 114 57 'privacy.resistFingerprinting.testGranularityMask', // 114 58 'security.pki.sha1_enforcement_level', // 103 59 /* 92-102 */ 60 'browser.urlbar.suggest.quicksuggest', // 95 61 'dom.securecontext.whitelist_onions', // 97 62 'dom.storage.next_gen', // 102 63 'network.http.spdy.enabled', // 100 64 'network.http.spdy.enabled.deps', 65 'network.http.spdy.enabled.http2', 66 'network.http.spdy.websockets', 67 'layout.css.font-visibility.level', // 94 68 'security.ask_for_password', // 102 69 'security.csp.enable', // 99 70 'security.password_lifetime', // 102 71 'security.ssl3.rsa_des_ede3_sha', // 93 72 73 /* REMOVED */ 74 /* 116-128 */ 75 'browser.fixup.alternate.enabled', 76 'browser.taskbar.previews.enable', 77 'browser.urlbar.dnsResolveSingleWordsAfterSearch', 78 'geo.provider.network.url', 79 'geo.provider.network.logging.enabled', 80 'geo.provider.use_gpsd', 81 'media.gmp-widevinecdm.enabled', 82 'network.protocol-handler.external.ms-windows-store', 83 'privacy.partition.always_partition_third_party_non_cookie_storage', 84 'privacy.partition.always_partition_third_party_non_cookie_storage.exempt_sessionstorage', 85 'privacy.partition.serviceWorkers', 86 /* 103-115 */ 87 'beacon.enabled', 88 'browser.startup.blankWindow', 89 'browser.newtab.preload', 90 'browser.newtabpage.activity-stream.feeds.discoverystreamfeed', 91 'browser.newtabpage.activity-stream.feeds.snippets', 92 'browser.region.network.url', 93 'browser.region.update.enabled', 94 'browser.search.region', 95 'browser.ssl_override_behavior', 96 'browser.tabs.warnOnClose', 97 'devtools.chrome.enabled', 98 'dom.disable_beforeunload', 99 'dom.disable_open_during_load', 100 'dom.netinfo.enabled', 101 'dom.vr.enabled', 102 'extensions.formautofill.addresses.supported', 103 'extensions.formautofill.available', 104 'extensions.formautofill.creditCards.available', 105 'extensions.formautofill.creditCards.supported', 106 'middlemouse.contentLoadURL', 107 'network.http.altsvc.oe', 108 /* 92-102 */ 109 'browser.urlbar.trimURLs', 110 'dom.caches.enabled', 111 'dom.storageManager.enabled', 112 'dom.storage_access.enabled', 113 'dom.targetBlankNoOpener.enabled', 114 'network.cookie.thirdparty.sessionOnly', 115 'network.cookie.thirdparty.nonsecureSessionOnly', 116 'privacy.firstparty.isolate.block_post_message', 117 'privacy.firstparty.isolate.restrict_opener_access', 118 'privacy.firstparty.isolate.use_site', 119 'privacy.window.name.update.enabled', 120 'security.insecure_connection_text.enabled', 121 122 /* IMPORTANT: last active pref must not have a trailing comma */ 123 /* reset parrot: check your open about:config after running the script */ 124 '_user.js.parrot' 125 ]; 126 127 console.clear(); 128 129 let c = 0; 130 for (const sPname of aPREFS) { 131 if (Services.prefs.prefHasUserValue(sPname)) { 132 Services.prefs.clearUserPref(sPname); 133 if (!Services.prefs.prefHasUserValue(sPname)) { 134 console.info('reset', sPname); 135 c++; 136 } else console.warn('failed to reset', sPname); 137 } 138 } 139 140 focus(); 141 142 const d = (c==1) ? ' pref' : ' prefs'; 143 alert(c ? 'successfully reset ' + c + d + "\n\nfor details check the console" : 'nothing to reset'); 144 145 return 'all done'; 146 147 })();