[GenericTheme > Settings] Fix hex color checking when not color type causing bad values oninput

This commit is contained in:
Ducko 2021-06-02 21:11:30 +01:00 committed by Alyxia Sother
parent d4b6b0a142
commit 833819c63f
No known key found for this signature in database
GPG key ID: 355968D14144B739

View file

@ -120,12 +120,7 @@ export default (manifest, content, repo) => {
.replace('Dnd', 'DND')}',
oninput: (val) => {
${
x[1][0] !== '#'
? `val = parseInt(val.substring(1, 3), 16).toString() + ', ' + parseInt(val.substring(3, 5), 16).toString() + ', ' + parseInt(val.substring(5, 7), 16).toString()`
: ''
}
${x[2] === 'color' && x[1][0] !== '#' ? `val = parseInt(val.substring(1, 3), 16).toString() + ', ' + parseInt(val.substring(3, 5), 16).toString() + ', ' + parseInt(val.substring(5, 7), 16).toString()` : ''}
console.log(val);
document.body.style.setProperty('${x[0]}', val);
@ -167,4 +162,7 @@ export default (manifest, content, repo) => {
}
};`;
};
<<<<<<< HEAD
=======
>>>>>>> 39784f0 ([GenericTheme > Settings] Fix hex color checking when not color type causing bad values oninput)