2023-06-03 21:22:03 +03:00
|
|
|
export default class extends HTMLElement {
|
|
|
|
|
connectedCallback () {
|
2023-06-30 23:22:57 +03:00
|
|
|
this.clearChecked()
|
|
|
|
|
|
2023-06-29 02:04:17 +03:00
|
|
|
this.addEventListener('click', (e) => {
|
|
|
|
|
e.stopPropagation()
|
2023-06-03 21:22:03 +03:00
|
|
|
|
2023-06-29 02:04:17 +03:00
|
|
|
navigator.clipboard.writeText(this.dataset.text || this.innerText.trim())
|
|
|
|
|
})
|
2023-06-03 21:22:03 +03:00
|
|
|
}
|
|
|
|
|
|
2023-06-30 23:22:57 +03:00
|
|
|
clearChecked () {
|
2023-06-29 02:04:17 +03:00
|
|
|
this.querySelectorAll('input').forEach((e) => {
|
|
|
|
|
e.checked = false
|
|
|
|
|
})
|
2023-06-11 18:42:00 +03:00
|
|
|
}
|
2023-06-03 21:22:03 +03:00
|
|
|
}
|