mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
parent
fd791d3d2f
commit
5fe3cc5028
|
@ -148,6 +148,21 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word,
|
|||
"}"
|
||||
"</script>";
|
||||
result+= "<script type=\"text/javascript\" src=\"qrc:///scripts/gd-builtin.js\"></script>";
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
if( GlobalBroadcaster::instance()->getPreference()->darkMode )
|
||||
{
|
||||
result += "<script type=\"text/javascript\" src=\"qrc:///scripts/darkreader.js\"></script>";
|
||||
result +=
|
||||
"<script type=\"text/javascript\">"
|
||||
"DarkReader.enable({"
|
||||
" brightness: 100,"
|
||||
" contrast: 90,"
|
||||
" sepia: 10"
|
||||
"});"
|
||||
"</script>";
|
||||
}
|
||||
#endif
|
||||
result += "</head><body>";
|
||||
|
||||
return result;
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
<file>scripts/gd-custom.js</file>
|
||||
<file>scripts/jquery-3.6.0.slim.min.js</file>
|
||||
<file>scripts/iframe-defer.js</file>
|
||||
<file>scripts/darkreader.js</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
7575
scripts/darkreader.js
Normal file
7575
scripts/darkreader.js
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue