From 9c5a0d7aacd41f73ff26b4b4b1a9a4feb9513ce8 Mon Sep 17 00:00:00 2001 From: Alexey Leshchenko Date: Tue, 10 Aug 2021 22:25:52 +0300 Subject: [PATCH] Fix excess padding below images --- bundles/loconotion.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bundles/loconotion.js b/bundles/loconotion.js index f836211..ff56f38 100644 --- a/bundles/loconotion.js +++ b/bundles/loconotion.js @@ -94,5 +94,8 @@ const imgs = document.querySelectorAll("img:not(.notion-emoji)"); for (let i = 0; i < imgs.length; i++) { parent = imgs[i].parentElement - parent.setAttribute("style", parent.getAttribute("style") + "; height:auto!important;"); + let style = parent.getAttribute("style") + style = style.replace(/padding-bottom: 133\.333\%;/, "") + style = style + "; height:auto!important;" + parent.setAttribute("style", style); }