mirror of
https://github.com/zyllian/webdog.git
synced 2025-01-18 03:32:21 -08:00
hide copy button in code blocks if javascript is disabled
This commit is contained in:
parent
3f09554af4
commit
08c786faf2
3 changed files with 3 additions and 0 deletions
|
@ -171,6 +171,7 @@ abbr {
|
|||
position: relative;
|
||||
|
||||
.copy {
|
||||
display: none;
|
||||
opacity: 0;
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
position: relative;
|
||||
|
||||
.copy {
|
||||
display: none;
|
||||
opacity: 0;
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
copyButton.addEventListener("click", async () => {
|
||||
await navigator.clipboard.writeText(source);
|
||||
});
|
||||
copyButton.style.display = "inline-block";
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Add table
Reference in a new issue