diff options
Diffstat (limited to 'themes/danix-xyz-hacker/assets/js/code-copy.js')
| -rw-r--r-- | themes/danix-xyz-hacker/assets/js/code-copy.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/themes/danix-xyz-hacker/assets/js/code-copy.js b/themes/danix-xyz-hacker/assets/js/code-copy.js index bfcfd4a..8591436 100644 --- a/themes/danix-xyz-hacker/assets/js/code-copy.js +++ b/themes/danix-xyz-hacker/assets/js/code-copy.js @@ -53,16 +53,16 @@ if (!text) return; navigator.clipboard.writeText(text).then(function () { - var copyIcon = btn.querySelector('[data-feather="copy"]'); - var checkIcon = btn.querySelector('[data-feather="check"]'); + var copyIcon = btn.querySelector('.icon-copy'); + var checkIcon = btn.querySelector('.icon-check'); var liveRegion = wrapper.querySelector('.code-copy-status'); - if (copyIcon) copyIcon.style.display = 'none'; + if (copyIcon) copyIcon.classList.add('hidden'); if (checkIcon) checkIcon.classList.remove('hidden'); btn.classList.add('is-copied'); if (liveRegion) liveRegion.textContent = 'Code copied to clipboard.'; setTimeout(function () { - if (copyIcon) copyIcon.style.display = ''; + if (copyIcon) copyIcon.classList.remove('hidden'); if (checkIcon) checkIcon.classList.add('hidden'); btn.classList.remove('is-copied'); if (liveRegion) liveRegion.textContent = ''; |
