0
0
Fork 0
file-hider/src/utils.ts
2022-06-11 19:24:16 +02:00

12 lines
254 B
TypeScript

export function changePathVisibility(path: string, hide: boolean) {
let n = document.querySelector(`[data-path="${path}"]`);
if (!n) {
return;
}
let p = n.parentElement
if (hide) {
p.style.display = `none`
} else {
p.style.display = ``;
}
}