(text)
| 43 | } |
| 44 | |
| 45 | async function copyTextToClipboard(text) { |
| 46 | if (navigator.clipboard && window.isSecureContext) { |
| 47 | await navigator.clipboard.writeText(text); |
| 48 | return true; |
| 49 | } |
| 50 | const ta = document.createElement("textarea"); |
| 51 | ta.value = text; |
| 52 | ta.setAttribute("readonly", ""); |
| 53 | ta.style.position = "absolute"; |
| 54 | ta.style.left = "-9999px"; |
| 55 | document.body.appendChild(ta); |
| 56 | ta.select(); |
| 57 | let ok = false; |
| 58 | try { |
| 59 | ok = document.execCommand("copy"); |
| 60 | } catch (e) { |
| 61 | ok = false; |
| 62 | } finally { |
| 63 | ta.remove(); |
| 64 | } |
| 65 | return ok; |
| 66 | } |
| 67 | |
| 68 | function openFolderShareResultModal(link) { |
| 69 | const existing = document.getElementById("folderShareResultModal"); |
no outgoing calls
no test coverage detected