From f5f19b5b5693f0d2d3704c36594e4dc0856cb391 Mon Sep 17 00:00:00 2001 From: zyl Date: Tue, 25 Jun 2024 16:44:28 -0700 Subject: [PATCH] update count immediately --- site/root/js/pet-me.js | 1 + 1 file changed, 1 insertion(+) diff --git a/site/root/js/pet-me.js b/site/root/js/pet-me.js index deebc49..57fc4e6 100644 --- a/site/root/js/pet-me.js +++ b/site/root/js/pet-me.js @@ -17,6 +17,7 @@ petButton.addEventListener("click", async () => { petButton.disabled = true; petButton.outerHTML = "| thanks! <3"; + count.innerText = Number.parseInt(count.innerText) + 1; const r = await (await fetch(url, { method: "post" })).json(); if (r.count) { count.innerText = r.count;