aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2023-04-16 15:29:24 +0200
committerGravatar GitHub <noreply@github.com> 2023-04-16 15:29:24 +0200
commit52cde870e20757d39413c01a66ced5bae5f80526 (patch)
tree36d350aff538aea0efabb225a9fd472da6389003 /p/scripts
parent48954503d11c743528b73055ed08e35c2cc4f95f (diff)
Improved: share to clipboard improved with animation and icon (#5295)
* share to clipboard improved with animation and icon * fix
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 521ed263b..beabbc6d9 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1089,6 +1089,9 @@ function init_stream(stream) {
el = ev.target.closest('.item.share > button[data-type="clipboard"]');
if (el && navigator.clipboard) { // Clipboard
navigator.clipboard.writeText(el.dataset.url);
+ el.classList.remove('ok');
+ el.dataset.foo = el.offsetWidth; // it does nothing, but it is needed. See https://github.com/FreshRSS/FreshRSS/pull/5295
+ el.classList.add('ok');
return false;
}