moved to web, forgot to exclude in gitignore

This commit is contained in:
2026-11-21 18:05:30 -05:00
parent 18b1172f93
commit 67849def05
14 changed files with 881 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
const link = document.getElementById("copy-link");
if (link && navigator.clipboard?.writeText) {
link.style.display = "";
link.hidden = false;
link.onclick = async (e) => {
e.preventDefault();
try {
await navigator.clipboard.writeText(`${location.origin}/${link.dataset.id}${link.dataset.extension}`);
link.textContent = "copied";
setTimeout(() => {
link.textContent = "copy link";
}, 2000);
} catch (error) {
console.error("failed to copy link:", error);
}
};
}