diff --git a/internal/web/index.html b/internal/web/index.html index 9de9768..eba5cee 100644 --- a/internal/web/index.html +++ b/internal/web/index.html @@ -2210,6 +2210,48 @@ nav.classList.toggle('mobile-nav-open'); toggle.classList.toggle('active'); } + + function closeShareModal() { + document.getElementById('share-modal').style.display = 'none'; + } + + function copyToClipboard(text) { + navigator.clipboard.writeText(text).then(() => { + showToast('Copied to clipboard!', 'success'); + }).catch(() => { + // Fallback for older browsers + const textArea = document.createElement('textarea'); + textArea.value = text; + document.body.appendChild(textArea); + textArea.select(); + document.execCommand('copy'); + document.body.removeChild(textArea); + showToast('Copied to clipboard!', 'success'); + }); + } + + // Add modal close on outside click + window.onclick = function(event) { + const shareModal = document.getElementById('share-modal'); + if (event.target == shareModal) { + shareModal.style.display = 'none'; + } + } + + + + \ No newline at end of file