diff options
-rw-r--r-- | assets/clipboard.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/assets/clipboard.js b/assets/clipboard.js index fdf84cf..2799f2f 100644 --- a/assets/clipboard.js +++ b/assets/clipboard.js @@ -11,6 +11,9 @@ document.querySelectorAll("pre code").forEach(code => { code.addEventListener("click", function (event) { + if (window.getSelection().toString()) { + return; + } select(code.parentElement); if (navigator.clipboard) { |