From 0621d47b860b1d121356998c4b01fe38fef22f71 Mon Sep 17 00:00:00 2001 From: Andreas Hnida Date: Thu, 21 Mar 2024 14:55:21 +0100 Subject: [PATCH] =?UTF-8?q?Workaround=20f=C3=BCr=20random=20

=20Tag=20Ge?= =?UTF-8?q?nerierung=20bei=20gemixtem=20Content=20in=20Shortcodes=20vorl?= =?UTF-8?q?=C3=A4ufig=20implementiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/custom.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 assets/js/custom.js diff --git a/assets/js/custom.js b/assets/js/custom.js new file mode 100644 index 0000000..38a0211 --- /dev/null +++ b/assets/js/custom.js @@ -0,0 +1,10 @@ +function removeEmptyParagraphs() { + const paragraphs = document.querySelectorAll('p'); + paragraphs.forEach(paragraph => { + if (!paragraph.textContent.trim() && !paragraph.querySelector('i')) { + paragraph.remove(); + } + }); +} + +removeEmptyParagraphs(); \ No newline at end of file