(value)
| 3387 | }; |
| 3388 | |
| 3389 | const copyText = async (value) => { |
| 3390 | const text = String(value || ''); |
| 3391 | if (!text) return false; |
| 3392 | if (navigator.clipboard && window.isSecureContext) { |
| 3393 | await navigator.clipboard.writeText(text); |
| 3394 | return true; |
| 3395 | } |
| 3396 | const ta = document.createElement('textarea'); |
| 3397 | ta.value = text; |
| 3398 | ta.setAttribute('readonly', 'readonly'); |
| 3399 | ta.style.position = 'absolute'; |
| 3400 | ta.style.left = '-9999px'; |
| 3401 | document.body.appendChild(ta); |
| 3402 | ta.select(); |
| 3403 | try { |
| 3404 | return document.execCommand('copy'); |
| 3405 | } finally { |
| 3406 | document.body.removeChild(ta); |
| 3407 | } |
| 3408 | }; |
| 3409 | |
| 3410 | const apiGet = async (url) => { |
| 3411 | const res = await fetch(withBase(url), { |
no outgoing calls
no test coverage detected