()
| 3 | // Copy to clipboard function |
| 4 | function copyToClipboard(text, button) { |
| 5 | function showSuccessMessage() { |
| 6 | if (button) { |
| 7 | const originalText = button.textContent; |
| 8 | const originalColor = button.style.color; |
| 9 | button.textContent = "✓ Copied"; |
| 10 | button.style.color = "green"; |
| 11 | setTimeout(() => { |
| 12 | button.textContent = originalText; |
| 13 | button.style.color = originalColor; |
| 14 | }, 1500); |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | // Check if modern clipboard API is available |
| 19 | if (navigator.clipboard && navigator.clipboard.writeText) { |
no outgoing calls
no test coverage detected