commit 3f083fb6242f8b8b3529e0a4a6fd836743b28981 parent 00413be4e5a102d11be802b56d60c230d7d30d45 Author: Alisa Lain <60989682+al1-ce@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:48:54 +0300 Update index.html Diffstat:
| M | public/index.html | | | 15 | +++++++++++++++ |
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/public/index.html b/public/index.html @@ -105,6 +105,21 @@ console.log(ret); } + + { + const copyButton = app.querySelector(".copy-button"); + const copyIcon = copyButton.querySelector("img"); + const urlInput = app.querySelector(".url-input"); + + copyButton.addEventListener("click", async () => { + await navigator.clipboard.writeText(urlInput.value); + copyIcon.src = "/clipboard-check.svg"; + + setTimeout(() => { + copyIcon.src = "/clipboard.svg"; + }, 2000); + }); + } </script> </body>