simplified

This commit is contained in:
2023-04-09 22:41:06 -05:00
parent 888687f2f5
commit 7caaec956f
2 changed files with 8 additions and 8 deletions

View File

@@ -5,10 +5,10 @@ const Elems = `
.click-handler
`
const getElems = () => {
const elems = Elems.split(',').filter(l => l.trim().length)
return elems.map(elem => document.querySelector<HTMLElement>(elem.trim()))
}
const getElems = () =>
Elems.split(',')
.filter(l => l.trim().length)
.map(elem => document.querySelector<HTMLElement>(elem.trim()))
const elemsSet = () =>
getElems().forEach(elem => elem && (elem.style.pointerEvents = 'none'))