From 1f3da4b8292a7c2ef7eafe9b3a00ef40eb30edac Mon Sep 17 00:00:00 2001 From: Pranav M Date: Mon, 18 Jul 2022 11:45:36 -0400 Subject: [PATCH] feat: edit the clipboard button to change border colour on success (#162) Co-authored-by: Jacky Zhao --- assets/js/clipboard.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/js/clipboard.js b/assets/js/clipboard.js index 78979c8..cd928c1 100644 --- a/assets/js/clipboard.js +++ b/assets/js/clipboard.js @@ -25,7 +25,10 @@ const addCopyButtons = () => { () => { button.blur(); button.innerHTML = svgCheck; - setTimeout(() => (button.innerHTML = svgCopy), 2000); + setTimeout(() => { + button.innerHTML = svgCopy + button.style.borderColor = "" + }, 2000); }, (error) => (button.innerHTML = "Error") );