fix: fix icon on codecopy button (#392)

This commit is contained in:
Robert Kaussow 2022-04-30 13:37:07 +02:00 committed by GitHub
parent 6d82d6f851
commit 2f5054f389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,13 +14,13 @@ document.addEventListener("DOMContentLoaded", function (event) {
if (trigger.hasAttribute("data-copy-feedback")) { if (trigger.hasAttribute("data-copy-feedback")) {
trigger.classList.add("gdoc-post__codecopy--success") trigger.classList.add("gdoc-post__codecopy--success")
trigger.querySelector(".icon.copy").classList.add("hidden") trigger.querySelector(".gdoc-icon.copy").classList.add("hidden")
trigger.querySelector(".icon.check").classList.remove("hidden") trigger.querySelector(".gdoc-icon.check").classList.remove("hidden")
setTimeout(function () { setTimeout(function () {
trigger.classList.remove("gdoc-post__codecopy--success") trigger.classList.remove("gdoc-post__codecopy--success")
trigger.querySelector(".icon.copy").classList.remove("hidden") trigger.querySelector(".gdoc-icon.copy").classList.remove("hidden")
trigger.querySelector(".icon.check").classList.add("hidden") trigger.querySelector(".gdoc-icon.check").classList.add("hidden")
}, 3000) }, 3000)
} }