(text)
| 67 | } |
| 68 | |
| 69 | async function copyText(text) { |
| 70 | if (navigator.clipboard && navigator.clipboard.writeText) { |
| 71 | await navigator.clipboard.writeText(text); |
| 72 | return; |
| 73 | } |
| 74 | const ta = el("textarea", { "aria-hidden": "true" }); |
| 75 | ta.value = text; |
| 76 | ta.style.position = "fixed"; |
| 77 | ta.style.left = "-9999px"; |
| 78 | document.body.appendChild(ta); |
| 79 | ta.select(); |
| 80 | document.execCommand("copy"); |
| 81 | document.body.removeChild(ta); |
| 82 | } |
| 83 | |
| 84 | function escapeHtml(s) { |
| 85 | return String(s) |