From 65b76042967afe1c7d092b08e0a3cf571d3dedef Mon Sep 17 00:00:00 2001
From: Blake Gearin <blakegearin@pm.me>
Date: Sun, 10 Apr 2022 08:42:45 +0000
Subject: [PATCH] Add temporary check mark icon on copy to clipboard
---
assets/js/index.js | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/assets/js/index.js b/assets/js/index.js
index 28411e4..4cae091 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -217,9 +217,13 @@
copyText.classList.add(yanked);
copyText.innerText = 'Link Copied';
if(!elem(`.${yanked}`, parent)) {
+ const icon = parent.getElementsByTagName('img')[0];
+ const originalSrc = icon.src;
+ icon.src = '{{ absURL "icons/check.svg" }}';
parent.appendChild(copyText);
setTimeout(function() {
parent.removeChild(copyText)
+ icon.src = originalSrc;
}, 2250);
}
}
--
Gitblit v1.10.0