(e)
| 358 | } |
| 359 | |
| 360 | _onText(e) { |
| 361 | this.$text.innerHTML = ''; |
| 362 | const text = e.text; |
| 363 | if (isURL(text)) { |
| 364 | const $a = document.createElement('a'); |
| 365 | $a.href = text; |
| 366 | $a.target = '_blank'; |
| 367 | $a.textContent = text; |
| 368 | this.$text.appendChild($a); |
| 369 | } else { |
| 370 | this.$text.textContent = text; |
| 371 | } |
| 372 | this.show(); |
| 373 | window.blop.play(); |
| 374 | } |
| 375 | |
| 376 | async _onCopy() { |
| 377 | await navigator.clipboard.writeText(this.$text.textContent); |
no test coverage detected