Skip to content
Open
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
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const regularFart = new Audio("fart-83471-fixed-regular.flac");
const critFart = new Audio("fart-4-228244-fixed-crit.flac");
const countFormatter = new Intl.NumberFormat('en-US', { notation: "compact" });
const farts = [];

function newFart(url) {
Expand Down Expand Up @@ -225,7 +228,8 @@ let counter = 0; // TODO: DONT FORGET TO SET TO 0 ON RELEASE!!!
// TODO: change it to onmousedown (it stopped working after separating button and label)
clickMe.onclick = () => {
counter += 1;
popupText.innerText = counter + "🍑💨";
const formattedCount = countFormatter.format(counter);
popupText.innerText = `${formattedCount} 🍑💨`;
fireEvents();
};

Expand Down