From 492ff000bf198221ea053b51b796b41c35c2279a Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 26 Feb 2026 13:26:45 -0500 Subject: [PATCH] Don't copy the text Copied! --- assets/javascripts/copy.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/javascripts/copy.js b/assets/javascripts/copy.js index 3410714..ec2a85c 100644 --- a/assets/javascripts/copy.js +++ b/assets/javascripts/copy.js @@ -12,6 +12,11 @@ async function handleCopy(event) { link = event.target; } + // If the text is already "Copied!", don't do anything + if (text == "Copied!") { + return; + } + try { // Write to clipboard await navigator.clipboard.writeText(text);