function copyText(text) { try { navigator.clipboard.writeText(text); console.log('Content copied to clipboard: "' + text + '"'); } catch (error) { console.error('Failed to copy "' + text + '":', error); } }