Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interference with other addons/settings? (privacy.resistFingerprinting) #22

Open
ArchangeGabriel opened this issue Feb 22, 2020 · 15 comments
Labels
blocked This cannot be resolved, because it is blocked by some dependency or similar… bug Something isn't working

Comments

@ArchangeGabriel
Copy link
Contributor

Bug description

On my system, it works on some websites (https://bugzilla.mozilla.org/, https://stuffandnonsense.co.uk), but not on most (https://kde.org, https://emojipedia.org/, https://webkit.org/, https://pinafore.social/…).

Steps to reproduce

  1. I have several add-ons like uBlock Origin, uMatrix, Dencentraleyes.
  2. I have numerous settings from https://github.com/ghacksuserjs/ghacks-user.js/ including privacy.resistFingerprinting (which overrides ui.systemUsesDarkTheme and makes this add-on necessary for dark theme to work at all).

Actual behaviour

Most websites that are supposed don’t get dark theme.

Expected behaviour

Those websites get dark theme.

System

Operating system and version: Arch Linux
Browser and version: Firefox Nightly
Add-on version: 1.1

@ArchangeGabriel ArchangeGabriel added the bug Something isn't working label Feb 22, 2020
@ArchangeGabriel
Copy link
Contributor Author

Other example of non-working website (much simpler, so maybe interesting to understand what is happening): https://septatrix.github.io/cpython-dark-docs/

@rugk
Copy link
Owner

rugk commented Feb 24, 2020

Hmm, are you really sure it is an incompatibility, i.e. with all these add-ons disabled it works? May also just depend on the website.

For me it works like this:

Also note the issue #9 has been fixed in master, but not yet released on AMO. 🤔 (did not notice a difference with the site you've provided)


So if it is true that other add-ons/settings cause this, could you please try to disable them one by one and test which one exactly is causing this?

@rugk
Copy link
Owner

rugk commented Feb 24, 2020

Also notice that websites could detect the presence of this add-on (due to such bugs) and at least detect whether you have a dark theme enabled, which obviously goes against the aim of privacy.resistFingerprinting. 😃

@ArchangeGabriel
Copy link
Contributor Author

Yes I know that this goes against privacy.resistFingerprinting, but this is trade-off I can accept.

If I disable privacy.resistFingerprinting, all websites work excepted https://pinafore.social/ (but I do have ui.systemUsesDarkTheme set to 1). So likely not an add-on, but just this option is causing the issue.

@rugk rugk changed the title Interference with other addons/settings? Interference with other addons/settings? (privacy.resistFingerprinting) Feb 24, 2020
@ArchangeGabriel
Copy link
Contributor Author

So if I set ui.systemUsesDarkTheme to 0 and disable privacy.resistFingerprinting, I get only the first two working. I suppose that without a proper API there’s not so much we can do.

@rugk
Copy link
Owner

rugk commented Feb 24, 2020

"the first two" = https://kde.org, https://emojipedia.org/ ?

@ArchangeGabriel
Copy link
Contributor Author

No sorry, I meant in your list: https://bugzilla.mozilla.org/ and https://stuffandnonsense.co.uk.

@rugk
Copy link
Owner

rugk commented Nov 23, 2020

FYI: AFAIK, Firefox usually prevents ui.systemUsesDarkTheme (and a dark theme in general) from working, if privacy.resistFingerprinting is enabled.

Also an update on #22 (comment): The fix for issue #9 has now been released with v1.2 of this add-on.

@tartpvule
Copy link
Contributor

tartpvule commented Mar 30, 2021

AFAICT:

https://kde.org/ works (now).

https://pinafore.social/ doesn't attach any "change" event listeners.

https://septatrix.github.io/cpython-dark-docs/ does not work due to #24.

https://stuffandnonsense.co.uk/ is currently "not working" due to the site's own fault: it specifies the color white (#fff) for the background in dark mode, for example.

I don't think this has anything to do with privacy.resistFingerprinting; I'm running with it turned on myself.

@Janmm14
Copy link

Janmm14 commented Sep 20, 2021

The main problem this addon has, is that it only adds css overrides extracted from media query preferred dark, but seems to be unable to remove the css from media query preferred light.

See how it here says "light dark":
https://codepen.io/kleinfreund/pen/NmpKZM

@rugk
Copy link
Owner

rugk commented Sep 20, 2021

The main problem this addon has, is that it only adds css overrides extracted from media query preferred dark, but seems to be unable to remove the css from media query preferred light.

That is correct. This is unfortunately a fundamental technical limitation, as explained in the Readme.

@ArchangeGabriel
Copy link
Contributor Author

The better API landed apparently: https://bugzilla.mozilla.org/show_bug.cgi?id=1547818#c18.

@rugk rugk self-assigned this Nov 28, 2021
@rugk rugk assigned rugk and unassigned rugk Dec 7, 2021
@rugk
Copy link
Owner

rugk commented Dec 8, 2021

So I have good news and bad news:

I'm sorry for that, but there is nothing I can do about that with a reasonable future support path. You can continue using v1.3 if that works for you that uses the old mechanism of manually reading and re-injecting the style-sets etc.
However, the new API provides more possibilities and also fixes a lot of edge-cases, where the old version just reached it's limits (see all the bug reports that were close, cf. #41). It did never work that well as it does now, and was always considered a workaround until a real API is available.
As such, I am very sorry, but as it seems this add-on currently cannot support and work with privacy.resistFingerprinting.

If your are affected by this and want to have this issue fixed, please feel free to look or open a Bugzilla report and make it possible for add-ons, or the layout.css.prefers-color-scheme.content-override config option in general, to override the chosen theme.

@rugk rugk added the blocked This cannot be resolved, because it is blocked by some dependency or similar… label Dec 8, 2021
@ArchangeGabriel
Copy link
Contributor Author

Already three open tickets:
https://bugzilla.mozilla.org/show_bug.cgi?id=1732114
https://bugzilla.mozilla.org/show_bug.cgi?id=1739194
https://bugzilla.mozilla.org/show_bug.cgi?id=1745453

@rugk
Copy link
Owner

rugk commented Feb 19, 2022

BTW opened #52 to show an inline-warning when this setting is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This cannot be resolved, because it is blocked by some dependency or similar… bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants