8m: JS formatting

This commit is contained in:
Reynir Björnsson 2023-02-23 09:32:58 +01:00
parent 166b96f0b6
commit aa5987f6ef

View file

@ -144,24 +144,12 @@ li::before {
setTimeout(function(){
top.location = next[Math.floor(Math.random()*next.length)];
}, 30000);
var colorToSet = colors[Math.floor(Math.random() * colors.length)];
document.querySelector("body").style.backgroundColor = colorToSet;
var bcolorToSet = bcolors[Math.floor(Math.random() * bcolors.length)];
var bcolorloop = document.querySelectorAll("h1, h2, h3, h4");
var acolorloop = document.querySelectorAll("a");
for (var x = 0; x < bcolorloop.length; x++)
bcolorloop[x].style.color = bcolorToSet;
for (var x = 0; x < acolorloop.length; x++)
acolorloop[x].style.color = bcolorToSet;
for (var x = 0; x < bcolorloop.length; x++) bcolorloop[x].style.color = bcolorToSet;
for (var x = 0; x < acolorloop.length; x++) acolorloop[x].style.color = bcolorToSet;
});
</script>