-
Notifications
You must be signed in to change notification settings - Fork 108
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
Dark mode issue #2102
Comments
I found another dictionary that causes the same issue outputf.mp4 |
you can use F12 to inspect the element and found out which style has taken effect and where does the style come from. |
which dictionary has introduced the style html? |
What do you mean? |
goldendict-ng/article_maker.cc Line 158 in 3a93f8b
@shenlebantongying any connection? |
I am honestly not sure. We hard coded a black background to reduce white flash, because before darkreader.js kicking in, the page could be white for a brief moment. Sadly, darkreader.js is not a color inverter as it can analyze page's actual colors, so there is a minor flaw that page slightly changes background darkness due to this hack. However, this hack might be outdated as some bugs related to background color in webengine were fixed. |
You can just disable dark reader mode in GD, then copy the entire content of darkreader.js https://www.jsdelivr.com/package/npm/darkreader to article-script.js You also need to copy this region of code. goldendict-ng/src/article_maker.cc Lines 172 to 206 in 7f9a23f
Then at the end call the The issue is that GD hardcoded a There is no fix to this issue unless we provide granular darkreadermode customization that change GD's built-in |
Describe the bug
One particular dictionary mess with dark mode engine.
If I disable that dictionary the problem goes away
I'm not sure to say if this is a GD bug or dictionary bug!
In v24.09.0-Release.316ec900 it only affect the background slightly (makes it darker)
In v25.2.0-Release.9caa1683 it makes background darker and other elements weird in color.
I have to mention that I'm using this article script.
The weird thing is that when I select an entry that has this problem it becomes okay after several tries!
It even fixes the darker background somehow
outputfile.mp4
Expected behavior
It should be like previous version at least and I want it to not mess with anything more than background
Screenshots
In v24.09.0-Release.316ec900
An entry that the mentioned dictionary doesn't have

An entry that the mentioned dictionary has

In v25.2.0-Release.9caa1683
An entry that the mentioned dictionary doesn't have

An entry that the mentioned dictionary has

To Reproduce
1.Use latest version
2.Use this dictionary
OS and software versions
The text was updated successfully, but these errors were encountered: