Fix Autocolors on chrome browser.

This commit is contained in:
John Livingston 2022-01-04 05:05:32 +01:00
parent 77407ea7f1
commit 19b3846a5a
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 18 additions and 12 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## 5.2.4
### Fixes
* Fix Autocolors on chrome browser
## 5.2.3
### Fixes

View File

@ -20,18 +20,18 @@ function computeAutoColors (): AutoColors | null {
const buttonStyles = window.getComputedStyle(button)
const autocolors: AutoColors = {
mainForeground: styles.getPropertyValue('--mainForegroundColor'),
mainBackground: styles.getPropertyValue('--mainBackgroundColor'),
greyForeground: styles.getPropertyValue('--greyForegroundColor'),
greyBackground: styles.getPropertyValue('--greyBackgroundColor'),
menuForeground: styles.getPropertyValue('--menuForegroundColor'),
menuBackground: styles.getPropertyValue('--menuBackgroundColor'),
inputForeground: styles.getPropertyValue('--inputForegroundColor'),
inputBackground: styles.getPropertyValue('--inputBackgroundColor'),
buttonForeground: buttonStyles.color,
buttonBackground: styles.getPropertyValue('--mainColor'),
link: styles.getPropertyValue('--mainForegroundColor'),
linkHover: styles.getPropertyValue('--mainForegroundColor')
mainForeground: styles.getPropertyValue('--mainForegroundColor').trim(),
mainBackground: styles.getPropertyValue('--mainBackgroundColor').trim(),
greyForeground: styles.getPropertyValue('--greyForegroundColor').trim(),
greyBackground: styles.getPropertyValue('--greyBackgroundColor').trim(),
menuForeground: styles.getPropertyValue('--menuForegroundColor').trim(),
menuBackground: styles.getPropertyValue('--menuBackgroundColor').trim(),
inputForeground: styles.getPropertyValue('--inputForegroundColor').trim(),
inputBackground: styles.getPropertyValue('--inputBackgroundColor').trim(),
buttonForeground: buttonStyles.color.trim(),
buttonBackground: styles.getPropertyValue('--mainColor').trim(),
link: styles.getPropertyValue('--mainForegroundColor').trim(),
linkHover: styles.getPropertyValue('--mainForegroundColor').trim()
}
const autoColorsTest = areAutoColorsValid(autocolors)
if (autoColorsTest !== true) {