fix color scheme getting reset during printing (#4807)

LightweightThemeConsumer interacts with the color scheme,
so disabling it prevents the color scheme from changing
whenever zoteroPrint runs.

Fixes: #4782
This commit is contained in:
abaevbog 2024-11-06 20:00:44 -08:00 committed by GitHub
parent 67505f3960
commit c567905bf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -385,6 +385,8 @@ cat "$CALLDIR/assets/chrome.manifest" >> chrome.manifest
replace_line 'handle: function bch_handle\(cmdLine\) {' 'handle: function bch_handle(cmdLine) {
\/\/ TEST_OPTIONS_PLACEHOLDER
' modules/BrowserContentHandler.sys.mjs
# prevent color scheme getting reset to 'light' during printing
replace_line 'new LightweightThemeConsumer\(document\);' '\/\/new LightweightThemeConsumer\(document\);' chrome/browser/content/browser/browser.js
export CALLDIR && perl -pi -e 'BEGIN { local $/; open $fh, "$ENV{CALLDIR}/assets/commandLineHandler.js"; $replacement = <$fh>; close $fh; } s/\/\/ TEST_OPTIONS_PLACEHOLDER/$replacement/' modules/BrowserContentHandler.sys.mjs
# Move test files to root directory