fix: fix icon on codecopy button (#392)

uci-hugo-doc
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
1 changed files with 4 additions and 4 deletions

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)
} }