From 4eeac7640f7a01605428dd1b1d8e63d75140d3ef Mon Sep 17 00:00:00 2001 From: Alexey Leshchenko Date: Sun, 9 Jan 2022 21:54:32 +0300 Subject: [PATCH] Fix header margin in columns --- bundles/loconotion.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bundles/loconotion.js b/bundles/loconotion.js index ff56f389a..11f211247 100644 --- a/bundles/loconotion.js +++ b/bundles/loconotion.js @@ -99,3 +99,14 @@ for (let i = 0; i < imgs.length; i++) { style = style + "; height:auto!important;" parent.setAttribute("style", style); } + +// fix the problem with headers in columns having unnecessary top margin + +const colHeaders = document.querySelectorAll(".notion-column_list-block .notion-header-block"); + +for (let i = 0; i < colHeaders.length; i++) { + el = colHeaders[i] + let style = el.getAttribute("style") + style = style.replace(/margin-top: .*;/, "") + el.setAttribute("style", style); +}