Changed copy function to show visually when stuff has been copied

This commit is contained in:
rain
2023-06-01 16:59:06 -05:00
parent 9be1edf3cd
commit 3803cb8763
4 changed files with 28 additions and 2 deletions
+6
View File
@@ -20,4 +20,10 @@ document.querySelector(".result-count").addEventListener("click", function() {
addresses.push( element.querySelector("td:nth-child(3)").innerText );
});
navigator.clipboard.writeText(addresses.join('\n'));
// Play the Copy animation
var copyDiv = document.querySelector('.copyAlert:not(.animate)')
if(copyDiv) {
copyDiv.classList.add('animate');
copyDiv.addEventListener('animationend', () => copyDiv.classList.remove('animate') );
}
});