This commit is contained in:
Adrien MALINGREY 2025-05-20 11:13:02 +02:00
parent 267303d4ce
commit 266ed7e24e

View File

@ -135,12 +135,12 @@ foreach ($interfaces as $interface) {
<script>
function changeColor(pvid, color) {
for (let i = 0; i < customColors.sheet.cssRules.length; i++) {
if (customColors.sheet.cssRules[i].selectorText == `[style*="--pvid: ${pvid}"]`) {
if (customColors.sheet.cssRules[i].selectorText == `[style*="--pvid: ${pvid};"]`) {
customColors.sheet.deleteRule(i)
break
}
}
customColors.sheet.insertRule(`[style*="--pvid: ${pvid}"] { background-color: ${color} }`)
customColors.sheet.insertRule(`[style*="--pvid: ${pvid};"] { background-color: ${color} }`)
}
</script>
</body>