-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrandomizer
1 lines (1 loc) · 915 Bytes
/
randomizer
1
javascript:(function(){function getRandomValue(min, max) {return Math.floor(Math.random() * (max - min + 1)) + min;}function getRandomColor(){return '#'+Math.floor(Math.random()*16777215).toString(16);}function getRandomFont(){var fonts=['Arial','Verdana','Helvetica','Times New Roman','Courier New','Georgia','Palatino','Garamond','Bookman','Comic Sans MS'];return fonts[Math.floor(Math.random()*fonts.length)];}var elements = document.querySelectorAll('body, a, img, input, textarea, button');elements.forEach(function(element) {element.style.backgroundColor = getRandomColor();element.style.color = getRandomColor();element.style.fontFamily = getRandomFont();element.style.fontSize = getRandomValue(10, 24) + 'px';if (element.tagName !== 'IMG') {element.style.border = getRandomValue(0, 3) + 'px solid ' + getRandomColor();} else {element.style.filter = 'hue-rotate(' + getRandomValue(0, 360) + 'deg)';}});})();