From c567905bf6cb5d39b6368f694e644f6072d3023c Mon Sep 17 00:00:00 2001 From: abaevbog Date: Wed, 6 Nov 2024 20:00:44 -0800 Subject: [PATCH] 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 --- app/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/build.sh b/app/build.sh index d4046ac6b8..27e210ace0 100755 --- a/app/build.sh +++ b/app/build.sh @@ -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