Comments (15)
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.
The better API landed apparently: https://bugzilla.mozilla.org/show_bug.cgi?id=1547818#c18.
from website-dark-mode-switcher.
So I have good news and bad news:
- The good: I do have implemented and released the new API with v2.0 of my extension.
- The bad: It does not seem to fix this issue, but actually make it worse. At least, Firefox seems to completely ignore the
layout.css.prefers-color-scheme.content-override
value whenprivacy.resistFingerprinting
is enabled.
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.
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.
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:
- https://bugzilla.mozilla.org/ works
- https://stuffandnonsense.co.uk works
- https://kde.org/ does not work
- https://emojipedia.org/ works
- https://webkit.org/ works
- https://pinafore.social/ works
- https://septatrix.github.io/cpython-dark-docs/ does not work
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.
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.
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.
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.
"the first two" = https://kde.org, https://emojipedia.org/ ?
from website-dark-mode-switcher.
No sorry, I meant in your list: https://bugzilla.mozilla.org/ and https://stuffandnonsense.co.uk.
from website-dark-mode-switcher.
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.
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.
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.
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.
BTW opened #52 to show an inline-warning when this setting is enabled.
from website-dark-mode-switcher.
Related Issues (20)
- Doesn't work with stylesheets imported with @import HOT 2
- Simplify dramatically now that mediaText is read-write HOT 4
- Automatic theme change not working in Open Fixture Library HOT 2
- Corss-origin stylesheets without crossorigin="anonymous" attribute not supported (e.g. Hardware.info) HOT 6
- Inconsistent Application on New Tabs HOT 12
- Support forcing light mode HOT 2
- Project is not needed anymore - What are the next steps? HOT 5
- https://ar.al/ Vimeo Embed Inverted HOT 2
- Bootstrap 5 Dark Mode has incorrect gradient/fades applied HOT 1
- implement optional syncing! HOT 1
- Adjust permissions doc
- Implement context menu for quickly switching to other styles
- Implement "clever"/context-based/"simple" button mode HOT 1
- Updated translations for 'da': Danish (dansk) HOT 1
- force dark theme through resistFingerprinting HOT 3
- Missing renaming
- Solution for Dark Mode Website Switcher not working with arkenfox's user.js HOT 2
- Show a warning in case privacy.resistFingerprinting is enabled
- Cannot download from Firefox Addon Store HOT 1
- Support setting light/dark mode on a per site/URL basis. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from website-dark-mode-switcher.