diff options
author | 2019-10-16 10:26:32 +0200 | |
---|---|---|
committer | 2019-10-16 10:26:32 +0200 | |
commit | 38789f82db4bfbeafa8b4e98e082a2ba6fb1d384 (patch) | |
tree | 9352493296d25d0f431de53f73e7457eecd1027c /src/webview/recipe.js | |
parent | Merge pull request #119 from getferdi/l10n_develop (diff) | |
download | ferdium-app-38789f82db4bfbeafa8b4e98e082a2ba6fb1d384.tar.gz ferdium-app-38789f82db4bfbeafa8b4e98e082a2ba6fb1d384.tar.zst ferdium-app-38789f82db4bfbeafa8b4e98e082a2ba6fb1d384.zip |
Add custom CSS for darkmode to fix WhatsApp and Threema QR codes
Diffstat (limited to 'src/webview/recipe.js')
-rw-r--r-- | src/webview/recipe.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/webview/recipe.js b/src/webview/recipe.js index 3f2338b68..854cbce58 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js | |||
@@ -10,6 +10,7 @@ import { | |||
10 | } from 'darkreader'; | 10 | } from 'darkreader'; |
11 | 11 | ||
12 | import ignoreList from './darkmode/ignore'; | 12 | import ignoreList from './darkmode/ignore'; |
13 | import customDarkModeCss from './darkmode/custom'; | ||
13 | 14 | ||
14 | import RecipeWebview from './lib/RecipeWebview'; | 15 | import RecipeWebview from './lib/RecipeWebview'; |
15 | 16 | ||
@@ -116,7 +117,7 @@ class RecipeController { | |||
116 | this.cldIdentifier.destroy(); | 117 | this.cldIdentifier.destroy(); |
117 | } | 118 | } |
118 | } | 119 | } |
119 | 120 | ||
120 | if (this.settings.service.isDarkModeEnabled || this.settings.app.darkMode) { | 121 | if (this.settings.service.isDarkModeEnabled || this.settings.app.darkMode) { |
121 | debug('Enable dark mode'); | 122 | debug('Enable dark mode'); |
122 | 123 | ||
@@ -128,7 +129,9 @@ class RecipeController { | |||
128 | injectDarkModeStyle(this.settings.service.recipe.path); | 129 | injectDarkModeStyle(this.settings.service.recipe.path); |
129 | } else if (!ignoreList.includes(window.location.host)) { | 130 | } else if (!ignoreList.includes(window.location.host)) { |
130 | // Use darkreader instead | 131 | // Use darkreader instead |
131 | enableDarkMode(); | 132 | enableDarkMode({}, { |
133 | css: customDarkModeCss[window.location.host] || '' | ||
134 | }); | ||
132 | } | 135 | } |
133 | } else { | 136 | } else { |
134 | debug('Remove dark mode'); | 137 | debug('Remove dark mode'); |