mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Make hints attach to child divs or spans - Issue #487
This commit is contained in:
parent
37ea90f584
commit
6cf9dd9e95
1 changed files with 8 additions and 0 deletions
|
@ -844,6 +844,14 @@ export function hintables(selectors = DOM.HINTTAGS_selectors, withjs = false) {
|
||||||
const elemSet = new Set([...elems, ...DOM.hintworthy_js_elems])
|
const elemSet = new Set([...elems, ...DOM.hintworthy_js_elems])
|
||||||
elems = [...elemSet]
|
elems = [...elemSet]
|
||||||
}
|
}
|
||||||
|
elems.forEach((element, index) => {
|
||||||
|
if (element.childNodes.length === 0 || element.tagName !== "A") return;
|
||||||
|
element.childNodes.forEach((child) => {
|
||||||
|
if (child.nodeName === "DIV" || child.nodeName === "SPAN") {
|
||||||
|
elems[index] = child as Element;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
return elems.filter(DOM.isVisible)
|
return elems.filter(DOM.isVisible)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue