Created
November 16, 2023 03:56
-
-
Save Nixinova/d7dd84418332554b1cb0ac6ff4499891 to your computer and use it in GitHub Desktop.
Example Random Version History Generator
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
<html> | |
<head> | |
<title>Random Version History</title> | |
<script> | |
function randverhist() { | |
const vers = []; | |
const endchance = 0.1; | |
for (let x = Math.round(Math.random()); x < Math.random() * 10; x++) { | |
for (let y = 0; y < Math.random() * 10; y++) { | |
for (let z = 0; z < Math.random() * 10; z++) { | |
vers.push(`${x}.${y}.${z}`); | |
if (Math.random() < endchance) break; | |
} | |
if (Math.random() < endchance) break; | |
} | |
if (Math.random() < endchance) break; | |
} | |
output.innerHTML = vers.join('<br>'); | |
} | |
</script> | |
</head> | |
<body> | |
<h1>Random Version History</h1> | |
<button onclick="randverhist();">Reroll</button> | |
<br> | |
<output id="output"></output> | |
<script>randverhist();</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment