Filter out empty paragraphs

This commit is contained in:
Marcus Noble 2020-11-09 21:19:15 +00:00
parent d5d24b0e7e
commit ef02f13ef4
1 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,11 @@ class FeedItem extends HTMLElement {
[...this.shadowRoot.querySelectorAll('a[href^=http]')].forEach(a => {
a.setAttribute("target", "_blank");
a.setAttribute("rel", "noopener");
});
[...this.shadowRoot.querySelectorAll('p')].forEach(p => {
if (p.innerText.trim() == "") {
p.remove();
}
})
})