Skip to content
Merged
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
Binary file added crit.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<img src="crit.webp" id="critImg">
<div id="popup">
<div id="popupText">
0
Expand Down
21 changes: 20 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ const eventsTable = [
clickMe.disabled = true;
clickMeText.innerText = `You broke it`;
playFart(critFart);
critImg.animate([
{ opacity: 0 },
{ opacity: 1 },
{ opacity: 0 }
], {
duration: 1000,
fill: "forwards"
});
},
},
{
Expand Down Expand Up @@ -116,6 +124,7 @@ const eventsTable = [
{
onCount: 69,
action: () => {
// TODO: add this sound here https://www.youtube.com/watch?v=3WAOxKOmR90
clickMe.disabled = true;
clickMeText.innerText = `Nice!`;
playFart(critFart);
Expand All @@ -129,7 +138,17 @@ const eventsTable = [
onCount: 100,
action: () => {
clickMe.disabled = true;
setTimeout(() => clickMe.disabled = false, 3000);
setTimeout(() => {
clickMe.disabled = false;
critImg.animate([
{ opacity: 0 },
{ opacity: 1 },
{ opacity: 0 }
], {
duration: 1000,
fill: "forwards"
});
}, 3000);
clickMeText.innerText = `HERE COMES THE BIG ONE`;
playFart(bigoneFart);
}
Expand Down
12 changes: 11 additions & 1 deletion main.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
body {
margin: 0;
}
.center {
position: absolute;
left: 50%;
Expand All @@ -16,6 +19,13 @@
user-select: none;
-webkit-user-select: none;
}
#critImg {
opacity: 0;
position: absolute;
height: 100%;
width: 100%;
object-fit: cover;
}
#popup {
visibility: hidden;
position: absolute;
Expand All @@ -35,4 +45,4 @@
}
.customCursor {
cursor: url("peach-emoji.png"), auto;
}
}