make submission header buttons native

This commit is contained in:
Alex Turchyn authored and Pete Matsyburka committed 2026-09-23 10:59:54 +03:00
1 parent 359f695eb5
commit 9abdb68bc5
5 files changed
+79 -55

No files matched your search

+3 -1
View File
@@ -6,7 +6,9 @@ export default class extends HTMLElement {
const text = this.dataset.text || this.innerText.trim()
if (navigator.clipboard) {
navigator.clipboard.writeText(text)
navigator.clipboard.writeText(text).then(() => {
window.webkit?.messageHandlers?.flash?.postMessage({ style: 'notice', message: this.dataset.copied })
})
} else {
if (e.target.tagName !== 'INPUT') {
alert(`Clipboard not available. Make sure you're using https://\nCopy text: ${text}`)