mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
[GenericTheme > Settings] Fix hex color checking when not color type causing bad values oninput
This commit is contained in:
parent
d4b6b0a142
commit
833819c63f
1 changed files with 4 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue