Files
trilium-share-gruvbox aa7a2d0ab5 Add Gruvbox share theme + blog system for Trilium (anonymized)
Blog generator, publish manager, share scripts, theme CSS, highlight.js
bundles, font, favicon, templates and generated-reference outputs, plus an
English installation guide.
2026-08-28 13:36:22 +02:00

27 lines
856 B
JavaScript

<script>
(function () {
function clearColHover(table) {
table.querySelectorAll(".col-hover").forEach(function (el) {
el.classList.remove("col-hover");
});
}
document.addEventListener("mouseover", function (e) {
var cell = e.target.closest("td, th");
if (!cell) return;
var table = cell.closest("table");
if (!table) return;
clearColHover(table);
var idx = cell.cellIndex;
table.querySelectorAll("tr").forEach(function (tr) {
var c = tr.children[idx];
if (c) c.classList.add("col-hover");
});
});
document.addEventListener("mouseout", function (e) {
var table = e.target.closest("table");
if (table && !table.contains(e.relatedTarget)) {
clearColHover(table);
}
});
})();
</script>