Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>Click me!</title>
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<body id="body">
<img src="crit.webp" id="critImg">
<div id="popup">
<div id="popupText">
Expand Down
12 changes: 12 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ function newFart(url) {
return fart;
}

function randomColor() {
const hexnum = '0123456789ABCDEF';
let color = '#';
for (var i = 0; i < 6; i++) {
color += hexnum[Math.floor(Math.random() * 16)];
}
return color;
}

const regularFart = newFart("fart-83471-fixed-regular.flac");
const critFart = newFart("fart-4-228244-fixed-crit.flac");
const bigoneFart = newFart("fart-paulstretched.flac");
Expand Down Expand Up @@ -114,6 +123,9 @@ const eventsTable = [
onCount: 30,
action: () => {
clickMeText.innerText = `it doesn't do anything, but farts`;
body.style.background = randomColor();
body.style.color = randomColor();
clickMeText.style.color = randomColor();
playFart(regularFart, true);
}
},
Expand Down
10 changes: 10 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ body {
width: 100px;
height: 100px;
}

#clickMe {
width: 200px;
height: 50px;
position: absolute;
font-size: 50px;
background-image: linear-gradient(to right, rgba(18, 18, 18, 1), rgba(127,127,127,1), rgba(255, 255, 255, 1));
border-radius: 50px;
}

#popupText {
display: inline-block;
white-space: nowrap;
Expand Down