Compare commits

..

110 Commits

Author SHA1 Message Date
4139630635 73 final 2020-03-12 03:37:46 +00:00
a542701ba5 Update troubleshooting-help.md 2020-02-25 00:21:42 +00:00
e67a0c868d Update troubleshooting-help.md 2020-02-25 00:20:19 +00:00
1afd52de6e 0306: minor tweak
There is no "show more details about an addon" anymore since they moved to the new html/card layout
2020-02-22 13:56:30 +00:00
64f34f1471 73-beta 2020-02-15 12:55:59 +00:00
5f3e3b2691 VR default prompt, RFP info, start 73-alpha 2020-02-14 01:00:02 +00:00
1ce1f74494 Update user.js 2020-02-12 12:03:29 +00:00
03f558b09c nit: 0517 SETTING
we don't include `Options>` in [SETTING] lines
2020-02-10 17:12:08 +00:00
cd9fc110b0 v1.2
look for `lock` file instead of `webappsstore.sqlite-shm` to detect if firefox is running or not (with this profile)

see https://github.com/ghacksuserjs/ghacks-user.js/pull/405#issuecomment-581447586 and follow-up comments.

Thanks @atomGit for reporting the issue and @rusty-snake for confirming it.
2020-02-10 16:47:17 +00:00
7619e312de 72 final 2020-01-24 16:48:16 +00:00
5d2c5de11c fixup deprecated ESR-cycle version 2020-01-15 02:53:07 +00:00
e1022c2e72 72-beta 2020-01-14 17:38:22 +00:00
e431b324c8 FF72 deprecated 2020-01-08 02:53:25 +00:00
18ad40a5c6 systemUsesDarkTheme -> RFP Alts 2019-12-25 02:14:49 +00:00
315de066ec typo (#870) 2019-12-24 11:49:19 +00:00
85273d0f19 0517: setting tag 2019-12-22 07:13:48 +00:00
ef293b57a7 5000s: add ui.systemUsesDarkTheme 2019-12-22 06:14:25 +00:00
79d316fd22 remove old deprecations 2019-12-19 16:37:19 +00:00
ed60588473 72-alpha start 2019-12-19 16:34:44 +00:00
07c128a190 71 final 2019-12-19 16:31:51 +00:00
5b1d56933b middlemouse.paste, see #735 2019-12-19 16:21:21 +00:00
34cfcedc1b 2402+2403, finally closes #735 2019-12-19 16:19:39 +00:00
f9146fdf24 update setting tags, minor tweaks 2019-12-18 09:46:21 +00:00
a1cdbc8324 1408 graphite, closes #1408 and 2619 puncyode 2019-12-18 07:46:44 +00:00
cd07641a9d 2701: make sure cookieBehavior is always honored (#866)
see #862
2019-12-18 05:02:25 +00:00
9c02949e04 0000: config.xhtml in FF73+ (#865) 2019-12-17 15:00:34 +00:00
1ef62a1036 media.block-autoplay-until-in-foreground #840 2019-12-12 01:24:12 +00:00
5672bc8cc8 2032 removed, 4002 inactive, closes #840 2019-12-12 01:21:17 +00:00
df1732745d 0308: seach engine updates: better info #840 2019-12-10 22:07:23 +00:00
30daf8640c FPI stuff 2019-12-09 20:18:42 +00:00
4074a37e1d 1201 + 1270 update (#859)
trim by a line, remove extra space, fixup on red, indicate it only applies if 1201 is false
2019-12-07 18:26:39 +00:00
97043b0ce1 71-beta 2019-12-06 12:19:21 +00:00
42ea484017 71 deprecated (#856) 2019-12-04 14:13:49 +13:00
3f6340b69c OMG!! 2019-12-03 14:51:44 +00:00
884e84a4cb about:config warning back to the top + active (#855) 2019-12-04 03:44:59 +13:00
560acfc94f 70 final 2019-12-03 07:31:47 +00:00
fb263f5624 favicons: 1031 better info, 1032 inactive #840 (#851) 2019-12-02 23:04:09 +13:00
19b392b83d 70-beta 2019-11-24 05:23:10 +00:00
2db76c95c3 1603: breaks icloud, closes #850 2019-11-23 16:19:09 +00:00
b6fbf77dde Create ghacks-clear-FF68inclusive-[RFP-alternatives].js 2019-11-23 03:04:14 +00:00
a4ba22e912 Delete ghacks-clear-FF60inclusive-[RFP-alternatives].js 2019-11-23 03:02:59 +00:00
163e18ce6d Create ghacks-clear-FF68inclusive-[deprecated].js 2019-11-23 02:57:26 +00:00
a13027905e Delete ghacks-clear-FF60inclusive-[deprecated].js 2019-11-23 02:56:30 +00:00
8f76d9439f 2002: add FF70 bugzilla link 2019-11-22 15:26:38 +00:00
f0980b5cb8 2002: add proxy_only_if_behind_proxy 2019-11-22 15:19:37 +00:00
450c9a9e0f simplify ciphers, closes #839 (#844)
* simplify ciphers

- let's not encourage (remove options 1, 2) changing your cipher suite FP
- remove "it's quite technical ..." (everything is technical to someone), trim to one line
- add test link so users can just see that it's FP'able
- reinforce not to fuck with the cipher suite in the cipher's sub-section
2019-11-23 03:23:08 +13:00
6acfdaccbd RFP stuff 2019-11-20 04:48:15 +00:00
a0e0a2a6c9 2680 tweak #840 2019-11-19 16:26:14 +00:00
f67e729197 whatsNewPanel correct version 2019-11-19 06:39:08 +00:00
19526b573c 2805 note, FPI change (#842) 2019-11-19 16:31:48 +13:00
b0221ec838 1576254 version fixup 2019-11-17 10:33:02 +00:00
a3611b7cf8 changes to prefs affecting extensions
also first word on pdfjs.disabled, to be consistent
2019-11-14 02:39:48 +00:00
bff1e84afa v1.6.0 2019-11-11 15:10:14 +00:00
1d31da40ec missing comma
thanks @sebp  - 0d57cfc44a (commitcomment-35890867)
2019-11-11 13:00:01 +00:00
0d57cfc44a about_newtab_segregation.enabled 2019-11-09 23:25:52 +00:00
0cfb2fb06d 1703: remove
default true since FF61, and ESR60 is now EOL
2019-11-09 23:23:34 +00:00
d5f297ed42 5000s: disable what's new 2019-11-08 18:06:35 +00:00
c13dbdf40d 1201 update (#838)
https://wiki.mozilla.org/Security:Renegotiation describes

> **the new default behaviour** that was introduced in experimental mozilla-central nightly versions on 2010-02-08

where the last step is

> - should the server (or a MITM) request **renegotiation**, Mozilla will terminate the connection with an error message

and then after talking about breakage ...

> The above defaults may break some client/server environments where a Server is still using old software and requires renegotiation.

mentions workarounds to reduce said breakage:

> In order to give such environments a way to keep using Firefox (et.al.) to connect to their vulnerable server infrastructure, the following preferences are available:

specifically talking about the first 2 prefs listed there, one allowing to specify a list of hosts "where renegotiation may be performed" and the 2nd one "completely disables the new protection mechanisms".
But both those prefs were removed in FF38, meaning that since then it's no longer possible to disable the default behaviour that is "should the server (or a MITM) request **renegotiation**, Mozilla will terminate the connection with an error message".

But all of this is about the **re**-negotiation part and not negotiation. And nowhere does it say "insecure" renegotiation, which, as I read it, means that FF will terminate the connection for any kind of **renegotiation**, safe or unsafe.

1201 controls the negotiation part:

> This pref controls the behaviour during the initial negotiation between client and server.
> If set to true, a Mozilla client will reject all connection attempts to servers that are still using the old SSL/TLS protocol and which might be vulnerable to the attack.
> Setting this preference to “true” is the only way to guarantee full protection against the attack.

I think "servers that are still using the old SSL/TLS protocol" actually means servers that **only** support the old protocols.
Servers still supporting those old protocols in addition to some new protocol versions should not be affected by this pref because FF will be able to negotiate to use one of the newer protocol versions.

Ergo lets fix the title and remove the line about renegotiation support because I think that's irrelevant.


ps. the sslpulse link is nice and I'd like to keep it somewhere but it doesn't really fit in 1201 IMO so I moved it to 1202.
2019-11-09 05:42:21 +13:00
6173104a9e re-add relevant deprecated items for ESR users (#837)
makes the prefsCleaner scripts useful again for users updating from ESR60 to ESR68
2019-11-09 05:30:03 +13:00
0c79b8b45b Update README.md 2019-11-08 13:46:20 +00:00
895f8d01d5 FF70+: shield studies no longer tied to FHR (#836)
https://bugzilla.mozilla.org/1569330
2019-11-09 02:01:33 +13:00
65dfad5c76 2701: UI changes 2019-11-06 11:37:24 +00:00
fdaf22780f Update README.md 2019-11-02 16:00:12 +00:00
16756646bb remove DoH, closes #790 2019-10-31 09:49:12 +00:00
e4f80225d8 FF72: FPI & IPv6 2019-10-28 12:12:52 +00:00
67eec9c85c pbmode insecure text/icon
see `1273`
- we already make **all** windows do this (which overrides the pb mode setting), and these were inactive
- in FF70+ the icon pref (for PB mode and all windows) is now default true
2019-10-27 04:50:59 +00:00
539750d2f2 FF70 hidden/default changes 2019-10-27 04:41:27 +00:00
d91226ed55 tweakin' 2019-10-20 23:59:16 +00:00
301fcd059d 1003: capacity no longer hidden 2019-10-20 23:36:48 +00:00
1cc9a08a18 remove ESR60.x deprecated
These are archived in #123
2019-10-20 22:40:53 +00:00
5d1857ddd8 start 70 commits 2019-10-20 22:32:37 +00:00
226af6f679 69 final 2019-10-20 22:20:50 +00:00
7f2c92f654 webgl.dxgl.enabled 2019-10-15 09:28:52 +00:00
5b82afd5bd webgl.dxgl.enabled, closes #814 2019-10-15 09:27:44 +00:00
d7b1877a1f browser.sessionhistory.max_entries see #808 2019-10-14 01:14:50 +00:00
1b6239eab8 remove 0804, closes #808
if anyone can show me how this stops history leaks, then I'll put it back with a note saying it's been broken since FF61
2019-10-14 01:13:27 +00:00
ad0187122d some SB were reinstated, closes #806 2019-10-07 16:20:03 +00:00
624e50faac replace ` with ' 2019-10-05 17:51:34 +00:00
a9e9392172 add some SB back, see #803 2019-10-05 17:47:25 +00:00
201210111e char fix 2019-10-05 15:12:21 +00:00
53f8578749 see #807 2019-10-05 15:09:19 +00:00
dc4d9e4dae revamp 0200s (#807), closes #0806
- split geo related vs language/locale related
- rip out intl.locale.requested
- rip out intl.regional_prefs.use_os_locales
- add intl.charset.fallback.override
2019-10-06 04:04:41 +13:00
e1b0eae740 goodbye http and other stuff (#801)
* goodbye http and other stuff

* dead link

* put back asmjs [1] ref

* 0805 test

* typo

* 1222 refs

* 1222 FF version

FYI: https://bugzilla.mozilla.org/show_bug.cgi?id=629558

* 2684: security delay ref

* ESR stuff

* ping ref

* 2684 ref

* 0606: give the standard it's correct name

https://html.spec.whatwg.org/multipage/links.html#hyperlink-auditing

* 0805 test instructions

* tweakin'
2019-09-21 16:20:10 +00:00
be0ccf6460 2300: service workers, closes #786 2019-09-17 12:43:50 +12:00
7c0a327b06 cache, closes #778 2019-09-16 15:25:30 +00:00
a35cba3914 2651: android UI breakage, closes #795 2019-09-12 16:22:09 +00:00
e16425310f 0320+0321: redundant prefs, #793 2019-09-12 15:52:46 +00:00
d503d96db0 0320+0321: redundant prefs, closes #793 2019-09-12 15:50:54 +00:00
335299a0cf browser.cache.disk_cache_ssl 2019-09-09 21:45:33 +00:00
7311cfdf84 remove 1002, closes #792 2019-09-09 21:43:50 +00:00
3a9440aeea 0707: Add mode 5 (#789) 2019-09-08 11:38:37 +00:00
3210ab0ca8 370: pocket -> 5000s, closes #787 2019-09-07 07:22:32 +00:00
2c734612f6 ummm .. beta
OK, did that all back to front... alpha is when we're working on the diffs .. beta is when we finished it
2019-09-04 21:40:04 +00:00
a12dd83b1f 69-alpha, fixes #766 2019-09-04 21:36:50 +00:00
44d9ceaf05 various tidyups 2019-09-04 01:40:33 +12:00
be9d9ac9ca 2701: tidyup 2019-09-03 03:34:16 +00:00
66cdb72927 FF69: deprecated 2019-09-02 07:07:50 +00:00
953b96431e 4000: RFP info re 1330467
it rode the train in 69... after a bumpy ride in 68 where it was backed out. Note: it still has some issues. Suggest users wipe the site permissions once upgraded to 69
2019-09-02 06:45:30 +00:00
4d72ad90b0 2701: cookies default FF69+ 2019-09-02 18:33:00 +12:00
cccb5b10b4 plugin.sessionPermissionNow.intervalInMinutes 2019-09-01 21:06:10 +00:00
810045eb39 1802: remove intervalInMinues
with `plugins.click_to_play` deprecated in FF69, no-one here is sure if `intervalInMinutes` still applies to Flash or even works, and no-one here cares about Flash. Happy to let Mozilla just keep restricting it more and more until it's deprecated in early 2020. Note: we already disable flash anyway in pref 1803.
2019-09-01 21:03:53 +00:00
b47982bb9a 2030: again 2019-09-01 20:32:53 +00:00
0691b8babe 2032: fix description
from earthlng 
> it blocks **all media** autoplay "until in foreground", not just audio.
> Source: https://dxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/browser-custom-element.js#1141
2019-09-01 19:22:28 +00:00
8d1c95c650 2030: autoplay changes
When ESR60 hits end of life, we should remove that value 2
2019-09-01 19:16:36 +00:00
19484e1a56 2805: see #774 2019-09-01 14:47:17 +00:00
755ebf88fb start 69 commits 2019-09-01 06:27:24 +00:00
d26ea4f39e 68 final 2019-08-31 14:51:08 +00:00
a0f3da208f 0390: better reference
- EFF has pretty pictures and stuff and explains the issues (replaces wikipedia which people can still search for)
- tor issue doesn't hold anything important (out it goes)
- moz wiki page I'll leave in for the bugzilla links if someone wants to research how it's all meant to work
2019-08-28 16:33:06 +00:00
5166811bd5 1003: closes #772 2019-08-21 13:01:12 +00:00
86bfdd1470 tweak: middlemouse.paste for Linux 2019-08-21 04:08:40 +00:00
8 changed files with 451 additions and 484 deletions

View File

@ -8,11 +8,11 @@ assignees: ''
---
Before you proceed...
- Keep reading this. Seriously.
- Note that we do not support forks (i.e. IceCat, Pale Moon, WaterFox, etc).
- Make sure you searched for the `[Setup` tags in the `user.js`.
- Issues will be closed as invalid if you do not [troubleshoot](https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.4-Troubleshooting), including
- confirming the problem is caused by the `user.js`
- searching the `[Setup` tags in the `user.js`
- Search the GitHub repository. The information you need is most likely here already.
- Check out our [troubleshooting](https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.4-Troubleshooting) wiki page, including steps to see if the problem is caused by the `user.js` or an extension.
- Note: We do not support forks
See also:
- Extension breakage due to prefs [issue 391](https://github.com/ghacksuserjs/ghacks-user.js/issues/391)

View File

@ -8,7 +8,7 @@ Everyone, experts included, should at least read the [implementation](https://gi
Note that we do *not* recommend connecting over Tor on Firefox. Use the [Tor Browser](https://www.torproject.org/projects/torbrowser.html.en) if your [threat model](https://www.torproject.org/about/torusers.html.en) calls for it, or for accessing hidden services.
Also be aware that this `user.js` is made specifically for Firefox. Using it as-is in other Gecko-based browsers can be counterproductive, especially in the Tor Browser.
Also be aware that this `user.js` is made specifically for desktop Firefox. Using it as-is in other Gecko-based browsers can be counterproductive, especially in the Tor Browser.
Sitemap: [Releases](https://github.com/ghacksuserjs/ghacks-user.js/releases), [changelogs](https://github.com/ghacksuserjs/ghacks-user.js/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Achangelog), [Wiki](https://github.com/ghacksuserjs/ghacks-user.js/wiki), [stickies](https://github.com/ghacksuserjs/ghacks-user.js/issues?q=is%3Aissue+is%3Aopen+label%3A%22sticky+topic%22). [diffs](https://github.com/ghacksuserjs/ghacks-user.js/issues?q=is%3Aissue+label%3Adiffs)
@ -18,7 +18,7 @@ Literally thousands of sources, references and suggestions. That said...
* Martin Brinkmann at [ghacks](https://www.ghacks.net/) <sup>1</sup>
* The ghacks community and commentators
* [12bytes](https://12bytes.org/articles/tech/firefox/firefoxgecko-configuration-guide-for-privacy-and-performance-buffs)
* The 12bytes article now uses this user.js and supplements it with an additional JS hosted at [GitLab](https://gitlab.com/labwrat/Firefox-user.js/tree/master)
* The 12bytes article now uses this user.js and supplements it with an additional JS hosted at [Codeberg](https://codeberg.org/12bytes.org/Firefox-user.js-supplement)
<sup>1</sup> The ghacks user.js was an independent project by [Thorin-Oakenpants](https://github.com/Thorin-Oakenpants) started in early 2015 and was [first published](https://www.ghacks.net/2015/08/18/a-comprehensive-list-of-firefox-privacy-and-security-settings/) at ghacks in August 2015. With Martin Brinkmann's blessing, it will keep the ghacks name.

View File

@ -2,7 +2,7 @@
## prefs.js cleaner for Linux/Mac
## author: @claustromaniac
## version: 1.1
## version: 1.2
## special thanks to @overdodactyl and @earthlng for a few snippets that I stol..*cough* borrowed from the updater.sh
@ -27,7 +27,7 @@ fQuit() {
fFF_check() {
# there are many ways to see if firefox is running or not, some more reliable than others
# this isn't elegant and might not be future-proof but should at least be compatible with any environment
while [ -e webappsstore.sqlite-shm ]; do
while [ -e lock ]; do
echo -e "\nThis Firefox profile seems to be in use. Close Firefox and try again.\n"
read -p "Press any key to continue."
done
@ -58,7 +58,7 @@ echo -e "\n\n"
echo " ╔══════════════════════════╗"
echo " ║ prefs.js cleaner ║"
echo " ║ by claustromaniac ║"
echo " ║ v1.1 ║"
echo " ║ v1.2 ║"
echo " ╚══════════════════════════╝"
echo -e "\nThis script should be run from your Firefox profile directory.\n"
echo "It will remove any entries from prefs.js that also exist in user.js."

View File

@ -1,6 +1,6 @@
/***
This will reset the preferences that are under sections 4600 & 4700 in the ghacks user.js
up to and including release 60-beta. These are the prefs that are no longer necessary,
up to and including Firefox/ESR 68. These are the prefs that are no longer necessary,
or they conflict with, privacy.resistFingerprinting if you have that enabled.
For instructions see:
@ -22,6 +22,8 @@
'dom.w3c_touch_events.enabled',
'media.ondevicechange.enabled',
'webgl.enable-debug-renderer-info',
'dom.w3c_pointer_events.enabled',
'ui.use_standins_for_native_colors',
/* section 4700 */
'general.useragent.override',
'general.buildID.override',

View File

@ -1,6 +1,6 @@
/***
This will reset the preferences that have been deprecated by Mozilla
and used in the ghacks user.js up to and including release 60-beta
and used in the ghacks user.js up to and including Firefox/ESR 68
It is in reverse order, so feel free to remove sections that do not apply
@ -12,8 +12,43 @@
let ops = [
/* deprecated */
/* ESR52.x users can remove sections 53-60 but it is not
crucial as your user.js will reinstate them */
/* 68 */
'browser.newtabpage.activity-stream.disableSnippets',
'browser.aboutHomeSnippets.updateUrl',
'lightweightThemes.update.enabled',
'security.csp.experimentalEnabled',
/* F67 */
'dom.event.highrestimestamp.enabled',
'browser.newtabpage.activity-stream.asrouter.userprefs.cfr',
/* 66 */
'browser.chrome.errorReporter.enabled',
'browser.chrome.errorReporter.submitUrl',
'network.allow-experiments',
/* 65 */
'browser.urlbar.autocomplete.enabled',
'browser.fixup.hide_user_pass',
/* 64 */
'browser.onboarding.enabled',
'devtools.webide.autoinstallADBHelper',
'devtools.webide.adbAddonURL',
'security.csp.enable_violation_events',
/* 63 */
'browser.search.countryCode',
'app.update.enabled',
'shield.savant.enabled',
'browser.chrome.favicons',
'media.autoplay.enabled',
'network.cookie.lifetime.days',
'browser.ctrlTab.previews',
/* 62 */
'plugin.state.java',
/* 61 */
'experiments.enabled',
'experiments.manifest.uri',
'experiments.supported',
'experiments.activeExperiment',
'network.jar.block-remote-files',
'network.jar.open-unsafe-types',
/* 60 */
'browser.newtabpage.directory.source',
'browser.newtabpage.enhanced',
@ -22,7 +57,6 @@
'extensions.shield-recipe-client.api_url',
'browser.newtabpage.activity-stream.enabled',
'dom.workers.enabled',
'view_source.tab',
/* 59 */
'intl.locale.matchOS',
'general.useragent.locale',
@ -76,8 +110,6 @@
'plugin.scan.WindowsMediaPlayer',
'media.getusermedia.screensharing.allow_on_old_platforms',
'dom.beforeAfterKeyboardEvent.enabled',
/* End of ESR52.x section */
/* 52 */
'network.http.sendSecureXSiteReferrer',
'media.gmp-eme-adobe.enabled',

View File

@ -1,7 +1,7 @@
/***
This will reset the preferences that have been removed completely from the ghacks user.js.
Last updated: 16-July-2019
Last updated: 19-December-2019
For instructions see:
https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
@ -168,14 +168,9 @@
'signon.storeWhenAutocompleteOff',
'xpinstall.whitelist.required',
/* 67-beta: Blocklist, SB & TP cleanup: these were all inactive */
'browser.safebrowsing.downloads.enabled',
'browser.safebrowsing.downloads.remote.block_dangerous',
'browser.safebrowsing.downloads.remote.block_dangerous_host',
'browser.safebrowsing.downloads.remote.block_potentially_unwanted',
'browser.safebrowsing.downloads.remote.block_uncommon',
'browser.safebrowsing.blockedURIs.enabled',
'browser.safebrowsing.malware.enabled',
'browser.safebrowsing.phishing.enabled',
'browser.safebrowsing.provider.google.gethashURL',
'browser.safebrowsing.provider.google.updateURL',
'browser.safebrowsing.provider.google4.gethashURL',
@ -204,6 +199,25 @@
'font.name.serif.x-western',
'layout.css.font-loading-api.enabled',
'toolkit.telemetry.cachedClientID',
/* 69-beta */
'plugin.sessionPermissionNow.intervalInMinutes',
/* 70-beta */
'browser.cache.disk_cache_ssl',
'browser.sessionhistory.max_entries',
'dom.push.connection.enabled',
'dom.push.serverURL',
'extensions.getAddons.discovery.api_url',
'extensions.htmlaboutaddons.discover.enabled',
'extensions.webservice.discoverURL',
'intl.locale.requested',
'intl.regional_prefs.use_os_locales',
'privacy.usercontext.about_newtab_segregation.enabled',
'security.insecure_connection_icon.pbmode.enabled',
'security.insecure_connection_text.pbmode.enabled',
'webgl.dxgl.enabled',
/* 71-beta */
'media.block-autoplay-until-in-foreground',
'middlemouse.paste',
/* reset parrot: check your open about:config after running the script */
'_user.js.parrot'
]

View File

@ -1,65 +1,11 @@
/*** ghacks-user.js troubleshooter.js v1.5.2 ***/
/*** ghacks-user.js troubleshooter.js v1.6.0 ***/
(function() {
if("undefined" === typeof(Services)) {
alert("about:config needs to be the active tab!");
return;
}
if ("undefined" === typeof(Services)) return alert('about:config needs to be the active tab!');
function getMyList(arr) {
let aRet = [];
let dummy = 0;
for (let i = 0, len = arr.length; i < len; i++) {
if (Services.prefs.prefHasUserValue(arr[i])) {
dummy = Services.prefs.getPrefType(arr[i]);
switch (dummy) {
case 32: // string (see https://dxr.mozilla.org/mozilla-central/source/modules/libpref/nsIPrefBranch.idl#31)
dummy = Services.prefs.getCharPref(arr[i]);
aRet.push({'name':arr[i],'value': dummy,'type':32});
break;
case 64: // int
dummy = Services.prefs.getIntPref(arr[i]);
aRet.push({'name':arr[i],'value': dummy,'type':64});
break;
case 128: // boolean
dummy = Services.prefs.getBoolPref(arr[i]);
aRet.push({'name':arr[i],'value': dummy,'type':128});
break;
default:
console.log("error detecting pref-type for '"+arr[i]+"' !");
}
}
}
return aRet;
}
function reapply(arr) {
for (let i = 0, len = arr.length; i < len; i++) {
switch (arr[i].type) {
case 32: // string
Services.prefs.setCharPref(arr[i].name, arr[i].value);
break;
case 64: // int
Services.prefs.setIntPref(arr[i].name, arr[i].value);
break;
case 128: // boolean
Services.prefs.setBoolPref(arr[i].name, arr[i].value);
break;
default:
console.log("error re-appyling value for '"+arr[i].name+"' !"); // should never happen
}
}
}
function myreset(arr) {
for (let i = 0, len = arr.length; i < len; i++) {
Services.prefs.clearUserPref(arr[i].name);
}
}
let ops = [
const aPREFS = [
/* known culprits */
'network.cookie.cookieBehavior',
@ -160,56 +106,108 @@
'last.one.without.comma'
]
// any runtime-set pref that everyone will have and that can be safely reset
const oFILLER = { type: 64, name: 'extensions.blocklist.pingCountTotal', value: -1 };
// reset prefs that set the same value as FFs default value
let aTEMP = getMyList(ops);
myreset(aTEMP);
reapply(aTEMP);
function getMyList(arr) {
const aRet = [];
for (const sPname of arr) {
if (Services.prefs.prefHasUserValue(sPname)) {
const ptype = Services.prefs.getPrefType(sPname);
switch (ptype) {
case 32: // string (see https://dxr.mozilla.org/mozilla-central/source/modules/libpref/nsIPrefBranch.idl#31)
aRet.push({'type':ptype,'name':sPname,'value':Services.prefs.getCharPref(sPname)});
break;
case 64: // int
aRet.push({'type':ptype,'name':sPname,'value':Services.prefs.getIntPref(sPname)});
break;
case 128: // boolean
aRet.push({'type':ptype,'name':sPname,'value':Services.prefs.getBoolPref(sPname)});
break;
default:
console.log("error detecting pref-type for '"+sPname+"' !");
}
}
}
return aRet;
}
const aBACKUP = getMyList(ops);
//console.log(aBACKUP.length, "user-set prefs from our list detected and their values stored.");
function reapply(arr) {
for (const oPref of arr) {
switch (oPref.type) {
case 32: // string
Services.prefs.setCharPref(oPref.name, oPref.value);
break;
case 64: // int
Services.prefs.setIntPref(oPref.name, oPref.value);
break;
case 128: // boolean
Services.prefs.setBoolPref(oPref.name, oPref.value);
break;
default:
console.log("error re-appyling value for '"+oPref.name+"' !"); // should never happen
}
}
}
let myArr = aBACKUP;
let found = false;
let aDbg = [];
focus();
myreset(aBACKUP); // reset all detected prefs
if (confirm("all detected prefs reset.\n\n!! KEEP THIS PROMPT OPEN AND TEST THE SITE IN ANOTHER TAB !!\n\nIF the problem still exists, this script can't help you - click cancel to re-apply your values and exit.\n\nClick OK if your problem is fixed.")) {
aDbg = myArr;
reapply(aBACKUP);
myreset(myArr.slice(0, parseInt(myArr.length/2)));
while (myArr.length >= 2) {
function myreset(arr) {
for (const oPref of arr) Services.prefs.clearUserPref(oPref.name);
}
function resetAllMatchingDefault(arr) {
const aTmp = getMyList(arr);
myreset(aTmp);
reapply(aTmp);
}
function _main(aALL) {
const _h = (arr) => Math.ceil(arr.length/2);
let aTmp = aALL, aDbg = aALL;
reapply(aALL);
myreset(aTmp.slice(0, _h(aTmp)));
while (aTmp.length) {
alert("NOW TEST AGAIN !");
if (confirm("if the problem still exists click OK, otherwise click cancel.")) {
myArr = myArr.slice(parseInt(myArr.length/2));
if (myArr.length == 1) {
alert("The problem is caused by more than 1 pref !\n\nNarrowed it down to "+ aDbg.length.toString() +" prefs, check the console ...");
break;
}
aTmp = aTmp.slice(_h(aTmp));
} else {
myArr = myArr.slice(0, parseInt(myArr.length/2));
aDbg = myArr;
if (myArr.length == 1) { found = true; break; }
aTmp = aTmp.slice(0, _h(aTmp));
aDbg = aTmp; // update narrowed down list
if (aDbg.length == 1) break;
}
reapply(aBACKUP);
myreset(myArr.slice(0, parseInt(myArr.length/2))); // reset half of the remaining prefs
reapply(aALL);
myreset(aTmp.slice(0, _h(aTmp))); // reset half of the remaining prefs
}
reapply(aBACKUP);
reapply(aALL);
if (aDbg.length == 1) return alert("narrowed it down to:\n\n"+aDbg[0].name+"\n");
if (aDbg.length == aALL.length) {
let msg = "Failed to narrow it down beyond the initial "+aALL.length+" prefs. The problem is most likely caused by at least 2 prefs!\n\n";
msg += "Either those prefs are too far apart in the list or there are exactly 2 culprits and they just happen to be at the wrong place.\n\n";
msg += "In case it's the latter, the script can add a dummy pref and you can try again - Try again?";
if (confirm(msg)) return _main([...aALL, oFILLER]);
} else if (aDbg.length > 10 && confirm("Narrowed it down to "+aDbg.length+" prefs. Try narrowing it down further?")) {
return _main(aDbg.reverse());
}
alert("Narrowed it down to "+ aDbg.length.toString() +" prefs, check the console ...");
console.log("The problem is caused by 2 or more of these prefs:");
for (const oPref of aDbg) console.log(oPref.name);
}
else {
reapply(aBACKUP);
resetAllMatchingDefault(aPREFS); // reset user-set prefs matching FFs default value
const aBAK = getMyList(aPREFS);
//console.log(aBAK.length, "user-set prefs from our list detected and their values stored.");
focus();
myreset(aBAK);
if (!confirm("all detected prefs reset.\n\n!! KEEP THIS PROMPT OPEN AND TEST THE SITE IN ANOTHER TAB !!\n\nIF the problem still exists, this script can't help you - click cancel to re-apply your values and exit.\n\nClick OK if your problem is fixed.")) {
reapply(aBAK);
return;
}
if (found) {
alert("narrowed it down to:\n\n"+myArr[0].name+"\n");
myreset(myArr); // reset the culprit
}
else {
console.log("the problem is caused by a combination of the following prefs:");
for (let i = 0, len = aDbg.length; i < len; i++) {
console.log(aDbg[i].name);
}
}
_main(aBAK);
})();

653
user.js

File diff suppressed because it is too large Load Diff