Make the copied text reappear after copy

This commit is contained in:
James Musselman 2024-07-08 19:25:45 -05:00
parent 95a3f2f83c
commit 95198a1bd0
No known key found for this signature in database
GPG key ID: 1DAEFF35ECB5D6DB

View file

@ -18,7 +18,7 @@ document.addEventListener("DOMContentLoaded", function () {
codeBlock.innerText = "Copied!";
setTimeout(function () {
codeBlock.innerText = originalText;
}, 1000); // Reset the text after 1 second
}, 1000); // Revert text after 1 second
} catch (err) {
console.error("Unable to copy:", err);
}