From 52cde870e20757d39413c01a66ced5bae5f80526 Mon Sep 17 00:00:00 2001 From: maTh Date: Sun, 16 Apr 2023 15:29:24 +0200 Subject: Improved: share to clipboard improved with animation and icon (#5295) * share to clipboard improved with animation and icon * fix --- p/scripts/main.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'p/scripts') 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; } -- cgit v1.2.3