From ed61a451f15b179ad53f645c913fb6b9185651bc Mon Sep 17 00:00:00 2001 From: edvardeishen Date: Sun, 21 Sep 2025 16:35:33 +0300 Subject: [PATCH] Added some kind of a dark theme on 100 clicks (didn't color the button, don't know how to do it properly here) and fixed random popup text highlighting on Chromium while clicking the button --- index.js | 16 ++++++++++++++++ main.css | 2 ++ 2 files changed, 18 insertions(+) diff --git a/index.js b/index.js index 5e443a5..90b0c83 100644 --- a/index.js +++ b/index.js @@ -112,6 +112,22 @@ const eventsTable = [ playFart(regularFart); } }, + { + onCount: 100, + action: () => { + clickMeText.innerText = `Congrats! You unclocked the dark theme! Keep Going!`; + playFart(regularFart); + document.body.style.backgroundColor = "#121212"; + popupText.style.color = "#FFFFFF"; + } + }, + { + onCount: 100, + action: () => { + clickMeText.innerText = `Congrats! You clicked it ${counter} times!`; + playFart(regularFart); + } + }, ]; eventsTable.sort((a, b) => b.onCount - a.onCount); diff --git a/main.css b/main.css index 317b0ed..24a3fe5 100644 --- a/main.css +++ b/main.css @@ -6,6 +6,7 @@ width: 10%; height: 8%; } + #clickMeText { position: absolute; left: 50%; @@ -23,6 +24,7 @@ top: 10px; width: 100px; height: 100px; + user-select: none; } #popupText { display: inline-block;