Created
May 18, 2020 12:48
-
-
Save alicraigmile/c3c96fd3d0ae7dc6e2b5f9c098833d0e to your computer and use it in GitHub Desktop.
We lost the twister spinner thingy so I made one we could cast to the telly instead
This file contains hidden or 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
var bodyParts = ["Left hand β","Right hand β", "Left foot π¦Ά", "Right foot π¦Ά"]; | |
var colours = ["Green π", "Red π","Yellow π»","Blue π΄σ §σ ’σ ³σ £σ ΄σ Ώ"]; | |
var getRandomInt = function(max) { | |
return Math.floor(Math.random() * Math.floor(max)); | |
} | |
var clearScreen = function() { | |
document.open(); | |
document.close(); | |
} | |
spin = function() { | |
clearScreen(); | |
document.write('<style>body {background: no-repeat url("https://ae01.alicdn.com/kf/HTB1sb0laP3z9KJjy0Fmq6xiwXXaG.jpg?size=333855&height=652&width=940&hash=4938fb356d012cd39e26da3c5587adac"); background-size: 100% 100%; font-family: "Comic Sans MS"; position: relative} .c { text-align: center; position: absolute; top: 50%; left: 50%; transform: translateY(-50%) translateX(-50%);;font-size: 500%; margin: auto; width: 50%; border: 10px solid lightgrey; padding: 1em; background-color: rgba(255,255,255,0.7)}</style>'); | |
document.write('<div class="c">'); | |
document.write(bodyParts[getRandomInt(bodyParts.length)]) | |
document.write("<br>"); | |
document.write(colours[getRandomInt(colours.length)]); | |
document.write('</div>'); | |
document.write('<script>document.body.addEventListener("click", spin)</script>'); | |
} | |
spin(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment