diff options
author | 2019-09-24 09:31:55 +0200 | |
---|---|---|
committer | 2019-09-24 09:31:55 +0200 | |
commit | b3a9cf43a5a2da830fdc401e461a831cbd5c2764 (patch) | |
tree | ea6d0755abeaa9c857ea5e780491ab412ef5f873 /src/webview | |
parent | Add darkreader to feature list and changelog (diff) | |
download | ferdium-app-b3a9cf43a5a2da830fdc401e461a831cbd5c2764.tar.gz ferdium-app-b3a9cf43a5a2da830fdc401e461a831cbd5c2764.tar.zst ferdium-app-b3a9cf43a5a2da830fdc401e461a831cbd5c2764.zip |
Add ignore list for darkmode
Diffstat (limited to 'src/webview')
-rw-r--r-- | src/webview/darkmode/ignore.js | 3 | ||||
-rw-r--r-- | src/webview/recipe.js | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/webview/darkmode/ignore.js b/src/webview/darkmode/ignore.js new file mode 100644 index 000000000..110df364f --- /dev/null +++ b/src/webview/darkmode/ignore.js | |||
@@ -0,0 +1,3 @@ | |||
1 | export default [ | ||
2 | 'discordapp.com', | ||
3 | ]; | ||
diff --git a/src/webview/recipe.js b/src/webview/recipe.js index fca00fde2..0eae279c6 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js | |||
@@ -9,6 +9,8 @@ import { | |||
9 | disable as disableDarkMode, | 9 | disable as disableDarkMode, |
10 | } from 'darkreader'; | 10 | } from 'darkreader'; |
11 | 11 | ||
12 | import ignoreList from './darkmode/ignore'; | ||
13 | |||
12 | import RecipeWebview from './lib/RecipeWebview'; | 14 | import RecipeWebview from './lib/RecipeWebview'; |
13 | 15 | ||
14 | import spellchecker, { switchDict, disable as disableSpellchecker, getSpellcheckerLocaleByFuzzyIdentifier } from './spellchecker'; | 16 | import spellchecker, { switchDict, disable as disableSpellchecker, getSpellcheckerLocaleByFuzzyIdentifier } from './spellchecker'; |
@@ -123,7 +125,7 @@ class RecipeController { | |||
123 | 125 | ||
124 | if (darkModeExists) { | 126 | if (darkModeExists) { |
125 | injectDarkModeStyle(this.settings.service.recipe.path); | 127 | injectDarkModeStyle(this.settings.service.recipe.path); |
126 | } else { | 128 | } else if (!ignoreList.includes(window.location.host)) { |
127 | // Use darkreader instead | 129 | // Use darkreader instead |
128 | enableDarkMode(); | 130 | enableDarkMode(); |
129 | } | 131 | } |