(text)
| 172 | } |
| 173 | |
| 174 | async function copyText(text) { |
| 175 | if (cordova?.plugins?.clipboard) { |
| 176 | cordova.plugins.clipboard.copy(text); |
| 177 | return; |
| 178 | } |
| 179 | |
| 180 | if (navigator.clipboard?.writeText) { |
| 181 | await navigator.clipboard.writeText(text); |
| 182 | return; |
| 183 | } |
| 184 | |
| 185 | throw new Error("Clipboard API unavailable"); |
| 186 | } |
| 187 | |
| 188 | async function fileToObjectUrl(file) { |
| 189 | const fs = fsOperation(file); |
no test coverage detected