Coder Social home page Coder Social logo

Comments (15)

ArchangeGabriel avatar ArchangeGabriel commented on June 3, 2024 3

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

from website-dark-mode-switcher.

ArchangeGabriel avatar ArchangeGabriel commented on June 3, 2024 1

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

from website-dark-mode-switcher.

rugk avatar rugk commented on June 3, 2024 1

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.

from website-dark-mode-switcher.

ArchangeGabriel avatar ArchangeGabriel commented on June 3, 2024

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

from website-dark-mode-switcher.

rugk avatar rugk commented on June 3, 2024

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?

from website-dark-mode-switcher.

rugk avatar rugk commented on June 3, 2024

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. πŸ˜ƒ

from website-dark-mode-switcher.

ArchangeGabriel avatar ArchangeGabriel commented on June 3, 2024

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.

from website-dark-mode-switcher.

ArchangeGabriel avatar ArchangeGabriel commented on June 3, 2024

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.

from website-dark-mode-switcher.

rugk avatar rugk commented on June 3, 2024

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

from website-dark-mode-switcher.

ArchangeGabriel avatar ArchangeGabriel commented on June 3, 2024

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

from website-dark-mode-switcher.

rugk avatar rugk commented on June 3, 2024

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.

from website-dark-mode-switcher.

tartpvule avatar tartpvule commented on June 3, 2024

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.

from website-dark-mode-switcher.

Janmm14 avatar Janmm14 commented on June 3, 2024

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

from website-dark-mode-switcher.

rugk avatar rugk commented on June 3, 2024

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.

from website-dark-mode-switcher.

rugk avatar rugk commented on June 3, 2024

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

from website-dark-mode-switcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.