hide copy button in code blocks if javascript is disabled

This commit is contained in:
zyl 2024-11-08 22:42:37 -08:00
parent 3f09554af4
commit 08c786faf2
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs
3 changed files with 3 additions and 0 deletions

View file

@ -171,6 +171,7 @@ abbr {
position: relative;
.copy {
display: none;
opacity: 0;
z-index: 1;
position: absolute;

View file

@ -7,6 +7,7 @@
position: relative;
.copy {
display: none;
opacity: 0;
z-index: 1;
position: absolute;

View file

@ -6,5 +6,6 @@
copyButton.addEventListener("click", async () => {
await navigator.clipboard.writeText(source);
});
copyButton.style.display = "inline-block";
}
})();