upload page after uploading

This commit is contained in:
2026-11-12 21:14:41 -05:00
parent 59c156f6ac
commit 350bf1842f
7 changed files with 118 additions and 15 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.textContent = "copied";
setTimeout(() => {
link.textContent = "copy link";
}, 2000);
} catch (error) {
console.error("failed to copy link:", error);
}
};
}