8m: JS formatting
All checks were successful
continuous-integration/drone/push Build is passing

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