From 6cb11e420a3f0cdbb7822bf7441727602dd5754e Mon Sep 17 00:00:00 2001 From: MAZ <29178226+MAZ01001@users.noreply.github.com> Date: Tue, 29 Jul 2025 18:33:33 +0200 Subject: [PATCH] added filter toggle button - new `string-template` and `renderStringPref` (regex pattern matching) in chromium extension options - new `cssInvertPage`, `cssInvertThumb`, and `cssInvertFilter` settings (with defaults; off by default) - available filters: `brightness()`, `contrast()`, `grayscale()`, `invert()`, `sepia()`, `saturate()`, and `hue-rotate()` via regex (valid CSS syntax) - translations for `en-US`, `en-GB`, `en-CA`, and `de` - filter influences PDF view container and PDF thmbnail container (thus also custom text/drawings/highlights) - new svg as icon (modified `toolbarButton-editorStamp.svg`) - button toggle is added next to zoom/scale controls in the middle of the toolbar --- extensions/chromium/options/options.html | 9 +++++ extensions/chromium/options/options.js | 44 +++++++++++++++++++++ extensions/chromium/preferences_schema.json | 19 +++++++++ l10n/de/viewer.ftl | 4 ++ l10n/en-CA/viewer.ftl | 4 ++ l10n/en-GB/viewer.ftl | 4 ++ l10n/en-US/viewer.ftl | 4 ++ web/app.js | 14 +++++++ web/app_options.js | 15 +++++++ web/images/toolbarButton-invert.svg | 12 ++++++ web/toolbar.js | 12 ++++++ web/viewer.css | 5 +++ web/viewer.html | 3 ++ web/viewer.js | 1 + 14 files changed, 150 insertions(+) create mode 100644 web/images/toolbarButton-invert.svg diff --git a/extensions/chromium/options/options.html b/extensions/chromium/options/options.html index 21468b20e..5f050060a 100644 --- a/extensions/chromium/options/options.html +++ b/extensions/chromium/options/options.html @@ -43,6 +43,15 @@ input:invalid {
+ +