document.addEventListener('click', (e) => { if (e.target.closest('.post .postSharing a')) { e.preventDefault(); const link = e.target.closest('.post .postSharing a'); const url = link.getAttribute('data-share'); navigator.clipboard.writeText(url); } });