Trigger fallback code to get max contrast value and use integer there
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
5e02d71588
commit
003e23520d
|
@ -1541,12 +1541,15 @@
|
||||||
try {
|
try {
|
||||||
var maxContrastHex = window.getComputedStyle(document.documentElement)
|
var maxContrastHex = window.getComputedStyle(document.documentElement)
|
||||||
.getPropertyValue('--color-text-maxcontrast').trim()
|
.getPropertyValue('--color-text-maxcontrast').trim()
|
||||||
|
if (maxContrastHex.length < 4) {
|
||||||
|
throw Error();
|
||||||
|
}
|
||||||
var maxContrast = parseInt(maxContrastHex.substring(1, 3), 16)
|
var maxContrast = parseInt(maxContrastHex.substring(1, 3), 16)
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
var maxContrast = OCA.Accessibility
|
var maxContrast = OCA.Accessibility
|
||||||
&& OCA.Accessibility.theme === 'themedark'
|
&& OCA.Accessibility.theme === 'themedark'
|
||||||
? '130'
|
? 130
|
||||||
: '118'
|
: 118
|
||||||
}
|
}
|
||||||
|
|
||||||
// size column
|
// size column
|
||||||
|
|
Loading…
Reference in New Issue