fix: fix icon on codecopy button (#392)
parent
6d82d6f851
commit
2f5054f389
|
@ -14,13 +14,13 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
|||
|
||||
if (trigger.hasAttribute("data-copy-feedback")) {
|
||||
trigger.classList.add("gdoc-post__codecopy--success")
|
||||
trigger.querySelector(".icon.copy").classList.add("hidden")
|
||||
trigger.querySelector(".icon.check").classList.remove("hidden")
|
||||
trigger.querySelector(".gdoc-icon.copy").classList.add("hidden")
|
||||
trigger.querySelector(".gdoc-icon.check").classList.remove("hidden")
|
||||
|
||||
setTimeout(function () {
|
||||
trigger.classList.remove("gdoc-post__codecopy--success")
|
||||
trigger.querySelector(".icon.copy").classList.remove("hidden")
|
||||
trigger.querySelector(".icon.check").classList.add("hidden")
|
||||
trigger.querySelector(".gdoc-icon.copy").classList.remove("hidden")
|
||||
trigger.querySelector(".gdoc-icon.check").classList.add("hidden")
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue