Last active
August 2, 2019 16:42
-
-
Save myobie/82fc0a85361dc9b999d9b2d8138ccc35 to your computer and use it in GitHub Desktop.
How the color changing works on nathanherald.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sorter () { return 0.5 - Math.random() } | |
var styles = [ 'blaze', 'sunshine', 'dusk', 'blood', 'puce' ] | |
function colorize () { | |
var style = styles.sort(sorter)[0] | |
document.body.className = style | |
} | |
colorize() | |
setInterval(colorize, 10000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment