]> git.bitcoin.ninja Git - satsto.me/commitdiff
Wipe copied indicator after 2 seconds
authorMatt Corallo <git@bluematt.me>
Fri, 12 Jul 2024 17:37:40 +0000 (17:37 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 12 Jul 2024 17:38:02 +0000 (17:38 +0000)
index.html

index 3a3a08c7f724a5fc2c0fe46f68293f77c73208de..cdda863851c22f5dee1d54921ebee4b05c6ce4e8 100644 (file)
                                }
                                window.copy = function(text, element_id) {
                                        navigator.clipboard.writeText(text);
-                                       document.getElementById("addr_copy_" + element_id).innerHTML = CLIPBOARD_CHECK_SVG;
+                                       const copy_elem = document.getElementById("addr_copy_" + element_id);
+                                       copy_elem.innerHTML = CLIPBOARD_CHECK_SVG;
+                                       setInterval(function() {
+                                               copy_elem.innerHTML = CLIPBOARD_SVG;
+                                       }, 2000);
                                }
                        });
                </script>