Uhlazení JavaScriptu…

This commit is contained in:
Jonas Havelka 2025-01-22 20:28:24 +01:00
parent a4175f836e
commit 95b46541c0

View file

@ -25,9 +25,9 @@ Zobrazit:
<script> <script>
function toggle_corrections(aclass) function toggle_corrections(aclass)
{ {
var stylesheets = document.styleSheets; const stylesheets = document.styleSheets;
var ssheet = null; let ssheet = null;
for (var i=0;i<stylesheets.length; i++){ for (let i=0; i<stylesheets.length; i++){
if (stylesheets[i].title === "opraf-css"){ if (stylesheets[i].title === "opraf-css"){
ssheet = stylesheets[i]; ssheet = stylesheets[i];
break; break;
@ -36,8 +36,8 @@ Zobrazit:
if (! ssheet){ if (! ssheet){
return; return;
} }
for (var i=0;i<ssheet.cssRules.length;i++){ for (let i=0; i<ssheet.cssRules.length; i++){
var rule = ssheet.cssRules[i]; const rule = ssheet.cssRules[i];
if (rule.selectorText === '[data-opravastatus="'+aclass+'"]'){ if (rule.selectorText === '[data-opravastatus="'+aclass+'"]'){
if (rule.style.display === ""){ if (rule.style.display === ""){
rule.style.display = "none"; rule.style.display = "none";