Files
Trilium/src/scripts/fixes/tableheaders.ts

10 lines
321 B
TypeScript
Raw Normal View History

2023-09-22 23:57:17 -04:00
/**
* This specifically fixes when you have empty corners
* like on tables with column and row headers
*/
export default function fixTableHeaders() {
const headers = document.querySelectorAll("th");
for (const header of headers) {
if (!header.textContent?.trim()) header.classList.add("empty");
}
}