aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-06-12 08:15:27 -0700
committerFuwn <[email protected]>2024-06-12 08:15:27 -0700
commit29304b05ad2c5b14731f2423be1b2afe5a72d6c5 (patch)
tree9eba433134259f8150d764a84a05a3cfa7cc935e
parent410405380eacb6cbf510100de5a104e5ff9746d4 (diff)
downloadmayu-29304b05ad2c5b14731f2423be1b2afe5a72d6c5.tar.xz
mayu-29304b05ad2c5b14731f2423be1b2afe5a72d6c5.zip
fix(index.html): full default set on load
-rw-r--r--index.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/index.html b/index.html
index 2d940f5..68dbfc9 100644
--- a/index.html
+++ b/index.html
@@ -241,11 +241,14 @@
const copyCodesInput = document.getElementById("copy-codes");
let inputValue = "demo";
let themeValue = "asoul";
+ const setCopyCodes = () => {
+ copyCodesInput.innerText = `![${inputValue}](${image.src})\n\n<img src="${image.src}" alt="${inputValue}" />`;
+ };
const set = () => {
inputValue = idInput.value || "demo";
themeValue = themeSelect.value || "asoul";
image.src = `https://counter.due.moe/get/@${inputValue}?theme=${themeValue}`;
- copyCodesInput.innerText = `![${inputValue}](${image.src})\n\n<img src="${image.src}" alt="${inputValue}" />`;
+ setCopyCodes();
};
const mascots = [
{ name: "Akaza Akari", image: "https://i.imgur.com/efamPLp.png" },
@@ -291,8 +294,7 @@
{ name: "Yuzuki Yukari", image: "https://i.imgur.com/84HOYIc.png" },
];
- copyCodesInput.innerText = `![${inputValue}](${image.src})\n\n<img src="${image.src}" alt="${inputValue}" />`;
-
+ set();
idInput.addEventListener("input", () => {
clearTimeout(inputTimeout);