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
Signed by: Musselman
GPG key ID: 1DAEFF35ECB5D6DB

View file

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