mirror of
https://github.com/zyllian/zyllian.github.io.git
synced 2025-05-10 02:26:45 -07:00
update count immediately
This commit is contained in:
parent
c03df4e661
commit
f5f19b5b56
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue