[style*="--pvid: ${pvid}"]
This commit is contained in:
parent
341b017c01
commit
30b47dedde
4
show.php
4
show.php
@ -131,12 +131,12 @@ foreach ($interfaces as $interface) {
|
|||||||
<script>
|
<script>
|
||||||
function changeColor(pvid, color) {
|
function changeColor(pvid, color) {
|
||||||
for (let i = 0; i < customColors.sheet.cssRules.length; i++) {
|
for (let i = 0; i < customColors.sheet.cssRules.length; i++) {
|
||||||
if (customColors.sheet.cssRules[i].selectorText == `[class*="pvid ${pvid}"], [class*="vlan ${pvid}"]`) {
|
if (customColors.sheet.cssRules[i].selectorText == `[style*="--pvid: ${pvid}"]`) {
|
||||||
customColors.sheet.deleteRule(i)
|
customColors.sheet.deleteRule(i)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
customColors.sheet.insertRule(`[class*="pvid ${pvid}"], [class*="vlan ${pvid}"] { background-color: ${color} }`)
|
customColors.sheet.insertRule(`[style*="--pvid: ${pvid}"] { background-color: ${color} }`)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user