Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onload = function() {
- (function() {
- var HTML = document.getElementsByTagName('head')[0];
- var colors = [
- '#ffe4da',
- '#ed2839',
- '#00ff7f',
- '#ffb6c1',
- '#02fcfa',
- '#fee834'
- ];
- var colorsCount = colors.length;
- var selectedColor = Math.floor((Math.random() * colorsCount) + 1) - 1;
- HTML.innerHTML += `
- <style>
- * {
- background-color: ${colors[selectedColor]};
- border-color: ${colors[selectedColor]} !important;
- }
- </style>
- `;
- })();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement