mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-21 20:30:39 +00:00
fix: fix icon on codecopy button (#392)
This commit is contained in:
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
Block a user