From 0d27689c64c6a83b74dc34cd354bf3e349fb43c6 Mon Sep 17 00:00:00 2001 From: Thorin-Oakenpants Date: Thu, 23 Jul 2020 12:22:20 +0000 Subject: [PATCH] update to ESR78 and this time add the file extension --- .../ghacks-clear-RFP-alternatives.js | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 scratchpad-scripts/ghacks-clear-RFP-alternatives.js diff --git a/scratchpad-scripts/ghacks-clear-RFP-alternatives.js b/scratchpad-scripts/ghacks-clear-RFP-alternatives.js new file mode 100644 index 0000000..a2824ad --- /dev/null +++ b/scratchpad-scripts/ghacks-clear-RFP-alternatives.js @@ -0,0 +1,65 @@ +/*** + Version: up to and including FF/ESR78 + + This will reset the preferences that are under sections 4600 & 4700 in the + ghacks user.js. These are the prefs that are no longer necessary, or they + conflict with, privacy.resistFingerprinting if you have that enabled. + + For instructions see: + https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts] +***/ + +(function() { + let ops = [ + /* section 4600 */ + 'dom.maxHardwareConcurrency', + 'dom.enable_resource_timing', + 'dom.enable_performance', + 'device.sensors.enabled', + 'browser.zoom.siteSpecific', + 'dom.gamepad.enabled', + 'dom.netinfo.enabled', + 'media.webspeech.synth.enabled', + 'media.video_stats.enabled', + 'dom.w3c_touch_events.enabled', + 'media.ondevicechange.enabled', + 'webgl.enable-debug-renderer-info', + 'dom.w3c_pointer_events.enabled', + 'ui.use_standins_for_native_colors', + 'ui.systemUsesDarkTheme', + 'ui.prefersReducedMotion' + /* section 4700 */ + 'general.useragent.override', + 'general.buildID.override', + 'general.appname.override', + 'general.appversion.override', + 'general.platform.override', + 'general.oscpu.override', + /* reset parrot: check your open about:config after running the script */ + '_user.js.parrot' + ] + + if("undefined" === typeof(Services)) { + alert("about:config needs to be the active tab!"); + return; + } + + let c = 0; + for (let i = 0, len = ops.length; i < len; i++) { + if (Services.prefs.prefHasUserValue(ops[i])) { + Services.prefs.clearUserPref(ops[i]); + if (!Services.prefs.prefHasUserValue(ops[i])) { + console.log("reset", ops[i]); + c++; + } else { console.log("failed to reset", ops[i]); } + } + } + + focus(); + + let d = (c==1) ? " pref" : " prefs"; + if (c > 0) { + alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)"); + } else { alert("nothing to reset"); } + +})();