1
0
FF_arkenfox_user.js/scratchpad-scripts/arkenfox-clear-deprecated.js

233 lines
8.1 KiB
JavaScript
Raw Normal View History

2020-07-23 12:57:12 +02:00
/***
2021-08-21 04:26:17 +02:00
Version: up to and including FF/ESR91
2020-07-23 12:57:12 +02:00
2021-07-07 16:33:20 +02:00
This will reset the preferences that have been deprecated by Mozilla
and used in the arkenfox user.js
2020-07-23 12:57:12 +02:00
2021-07-07 16:33:20 +02:00
It is in reverse order, so feel free to remove sections that do not apply
2020-07-23 12:57:12 +02:00
2021-07-07 16:33:20 +02:00
For instructions see:
https://github.com/arkenfox/user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
2020-07-23 12:57:12 +02:00
***/
2021-07-07 16:33:20 +02:00
(() => {
if ('undefined' === typeof(Services)) return alert('about:config needs to be the active tab!');
const aPREFS = [
2020-07-23 12:57:12 +02:00
/* deprecated */
2021-08-21 04:26:17 +02:00
/* FF79-91 */
'browser.cache.offline.storage.enable',
'browser.download.hide_plugins_without_extensions',
'browser.library.activity-stream.enabled',
'browser.search.geoSpecificDefaults',
'browser.search.geoSpecificDefaults.url',
'dom.ipc.plugins.flash.subprocess.crashreporter.enabled',
'dom.ipc.plugins.reportCrashURL',
'dom.w3c_pointer_events.enabled',
'intl.charset.fallback.override',
'network.ftp.enabled',
'plugin.state.flash',
'security.mixed_content.block_object_subrequest',
'security.ssl.errorReporting.automatic',
'security.ssl.errorReporting.enabled',
'security.ssl.errorReporting.url',
/* 69-78 */
'browser.newtabpage.activity-stream.telemetry.ping.endpoint',
2020-07-23 12:57:12 +02:00
'browser.tabs.remote.allowLinkedWebInFileUriProcess',
2021-08-21 04:26:17 +02:00
'browser.urlbar.oneOffSearches',
'devtools.webide.autoinstallADBExtension',
'devtools.webide.enabled',
'dom.indexedDB.enabled',
2020-07-23 12:57:12 +02:00
'extensions.blocklist.url',
'geo.wifi.logging.enabled',
2021-08-21 04:26:17 +02:00
'geo.wifi.uri',
2020-07-23 12:57:12 +02:00
'gfx.downloadable_fonts.woff2.enabled',
'media.autoplay.allow-muted',
2021-08-21 04:26:17 +02:00
'media.autoplay.enabled.user-gestures-needed',
'offline-apps.allow_by_default',
'plugins.click_to_play',
'privacy.userContext.longPressBehavior',
'toolkit.cosmeticAnimations.enabled',
'toolkit.telemetry.hybridContent.enabled',
'webgl.disable-extensions',
/* 61-68 */
'app.update.enabled',
2020-07-23 12:57:12 +02:00
'browser.aboutHomeSnippets.updateUrl',
'browser.chrome.errorReporter.enabled',
'browser.chrome.errorReporter.submitUrl',
2021-08-21 04:26:17 +02:00
'browser.chrome.favicons',
'browser.ctrlTab.previews',
2020-07-23 12:57:12 +02:00
'browser.fixup.hide_user_pass',
2021-08-21 04:26:17 +02:00
'browser.newtabpage.activity-stream.asrouter.userprefs.cfr',
'browser.newtabpage.activity-stream.disableSnippets',
2020-07-23 12:57:12 +02:00
'browser.onboarding.enabled',
'browser.search.countryCode',
2021-08-21 04:26:17 +02:00
'browser.urlbar.autocomplete.enabled',
'devtools.webide.adbAddonURL',
'devtools.webide.autoinstallADBHelper',
'dom.event.highrestimestamp.enabled',
'experiments.activeExperiment',
2020-07-23 12:57:12 +02:00
'experiments.enabled',
'experiments.manifest.uri',
'experiments.supported',
2021-08-21 04:26:17 +02:00
'lightweightThemes.update.enabled',
'media.autoplay.enabled',
'network.allow-experiments',
'network.cookie.lifetime.days',
2020-07-23 12:57:12 +02:00
'network.jar.block-remote-files',
'network.jar.open-unsafe-types',
2021-08-21 04:26:17 +02:00
'plugin.state.java',
'security.csp.enable_violation_events',
'security.csp.experimentalEnabled',
'shield.savant.enabled',
/* 60 or earlier */
'browser.bookmarks.showRecentlyBookmarked',
'browser.casting.enabled',
'browser.crashReports.unsubmittedCheck.autoSubmit',
'browser.formautofill.enabled',
'browser.formfill.saveHttpsForms',
'browser.fullscreen.animate',
'browser.history.allowPopState',
'browser.history.allowPushState',
'browser.history.allowReplaceState',
'browser.newtabpage.activity-stream.enabled',
'browser.newtabpage.directory.ping',
2020-07-23 12:57:12 +02:00
'browser.newtabpage.directory.source',
'browser.newtabpage.enhanced',
'browser.newtabpage.introShown',
2021-08-21 04:26:17 +02:00
'browser.pocket.api',
'browser.pocket.enabled',
'browser.pocket.oAuthConsumerKey',
'browser.pocket.site',
'browser.polaris.enabled',
'browser.safebrowsing.appRepURL',
'browser.safebrowsing.enabled',
'browser.safebrowsing.gethashURL',
'browser.safebrowsing.malware.reportURL',
'browser.safebrowsing.provider.google.appRepURL',
'browser.safebrowsing.reportErrorURL',
'browser.safebrowsing.reportGenericURL',
'browser.safebrowsing.reportMalwareErrorURL',
'browser.safebrowsing.reportMalwareMistakeURL',
'browser.safebrowsing.reportMalwareURL',
'browser.safebrowsing.reportPhishMistakeURL',
'browser.safebrowsing.reportURL',
'browser.safebrowsing.updateURL',
'browser.search.showOneOffButtons',
'browser.selfsupport.enabled',
'browser.selfsupport.url',
'browser.sessionstore.privacy_level_deferred',
'browser.tabs.animate',
'browser.trackingprotection.gethashURL',
'browser.trackingprotection.updateURL',
'browser.urlbar.unifiedcomplete',
'browser.usedOnWindows10.introURL',
'camera.control.autofocus_moving_callback.enabled',
2020-07-23 12:57:12 +02:00
'camera.control.face_detection.enabled',
2021-08-21 04:26:17 +02:00
'datareporting.healthreport.about.reportUrl',
'datareporting.healthreport.about.reportUrlUnified',
'datareporting.healthreport.documentServerURI',
'datareporting.healthreport.service.enabled',
'datareporting.policy.dataSubmissionEnabled.v2',
'devtools.webide.autoinstallFxdtAdapters',
'dom.archivereader.enabled',
'dom.battery.enabled',
'dom.beforeAfterKeyboardEvent.enabled',
'dom.disable_image_src_set',
'dom.disable_window_open_feature.scrollbars',
2020-07-23 12:57:12 +02:00
'dom.disable_window_status_change',
2021-08-21 04:26:17 +02:00
'dom.enable_user_timing',
'dom.flyweb.enabled',
2020-07-23 12:57:12 +02:00
'dom.idle-observers-api.enabled',
2021-08-21 04:26:17 +02:00
'dom.keyboardevent.code.enabled',
'dom.network.enabled',
'dom.push.udp.wakeupEnabled',
'dom.telephony.enabled',
'dom.vr.oculus050.enabled',
'dom.workers.enabled',
'dom.workers.sharedWorkers.enabled',
2020-07-23 12:57:12 +02:00
'extensions.formautofill.experimental',
2021-08-21 04:26:17 +02:00
'extensions.screenshots.system-disabled',
'extensions.shield-recipe-client.api_url',
'extensions.shield-recipe-client.enabled',
'full-screen-api.approval-required',
'general.useragent.locale',
2020-07-23 12:57:12 +02:00
'geo.security.allowinsecure',
2021-08-21 04:26:17 +02:00
'intl.locale.matchOS',
'loop.enabled',
'loop.facebook.appId',
'loop.facebook.enabled',
'loop.facebook.fallbackUrl',
'loop.facebook.shareUrl',
'loop.feedback.formURL',
'loop.feedback.manualFormURL',
'loop.logDomains',
'loop.server',
'media.block-play-until-visible',
2020-07-23 12:57:12 +02:00
'media.eme.apiVisible',
2021-08-21 04:26:17 +02:00
'media.eme.chromium-api.enabled',
2020-07-23 12:57:12 +02:00
'media.getusermedia.screensharing.allow_on_old_platforms',
2021-08-21 04:26:17 +02:00
'media.getusermedia.screensharing.allowed_domains',
'media.gmp-eme-adobe.autoupdate',
2020-07-23 12:57:12 +02:00
'media.gmp-eme-adobe.enabled',
'media.gmp-eme-adobe.visible',
2021-08-21 04:26:17 +02:00
'network.http.referer.userControlPolicy',
'network.http.sendSecureXSiteReferrer',
'network.http.spdy.enabled.http2draft',
2020-07-23 12:57:12 +02:00
'network.http.spdy.enabled.v3-1',
2021-08-21 04:26:17 +02:00
'network.websocket.enabled',
'pageThumbs.enabled',
'pfs.datasource.url',
'plugin.scan.Acrobat',
'plugin.scan.Quicktime',
'plugin.scan.WindowsMediaPlayer',
'plugins.enumerable_names',
2020-07-23 12:57:12 +02:00
'plugins.update.notifyUser',
2021-08-21 04:26:17 +02:00
'plugins.update.url',
'privacy.clearOnShutdown.passwords',
'privacy.donottrackheader.value',
'security.mixed_content.send_hsts_priming',
'security.mixed_content.use_hsts',
2020-07-23 12:57:12 +02:00
'security.ssl3.ecdhe_ecdsa_rc4_128_sha',
'security.ssl3.ecdhe_rsa_rc4_128_sha',
'security.ssl3.rsa_rc4_128_md5',
'security.ssl3.rsa_rc4_128_sha',
'security.tls.insecure_fallback_hosts.use_static_list',
2021-08-21 04:26:17 +02:00
'security.tls.unrestricted_rc4_fallback',
'security.xpconnect.plugin.unrestricted',
'social.directories',
'social.enabled',
'social.remote-install.enabled',
'social.share.activationPanelEnabled',
'social.shareDirectory',
'social.toast-notifications.enabled',
'social.whitelist',
'toolkit.telemetry.unifiedIsOptIn',
2020-07-23 12:57:12 +02:00
/* reset parrot: check your open about:config after running the script */
'_user.js.parrot'
2021-07-07 16:33:20 +02:00
];
console.clear();
2020-07-23 12:57:12 +02:00
let c = 0;
2021-07-07 16:33:20 +02: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 12:57:12 +02:00
c++;
2021-07-07 16:33:20 +02:00
} else console.warn('failed to reset', sPname);
2020-07-23 12:57:12 +02:00
}
}
2021-07-07 16:33:20 +02:00
2020-07-23 12:57:12 +02:00
focus();
2021-07-07 16:33:20 +02: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 12:57:12 +02:00
})();