mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
help.ts: Hide empty alias divs
This commit is contained in:
parent
54e980499c
commit
d89311cf17
1 changed files with 8 additions and 0 deletions
|
@ -60,6 +60,14 @@ async function setCommandAliases() {
|
||||||
aliasElems[excmd].appendChild(aliasLi)
|
aliasElems[excmd].appendChild(aliasLi)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove all aliasElems that do not have at least one alias
|
||||||
|
Object.values(aliasElems)
|
||||||
|
.filter(
|
||||||
|
(e: HTMLElement) =>
|
||||||
|
!Array.from(e.children).find(c => c.tagName == "LI"),
|
||||||
|
)
|
||||||
|
.forEach((e: HTMLElement) => e.parentNode.removeChild(e))
|
||||||
}
|
}
|
||||||
|
|
||||||
browser.storage.onChanged.addListener((changes, areaname) => {
|
browser.storage.onChanged.addListener((changes, areaname) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue