Filter out empty paragraphs

This commit is contained in:
Marcus Noble 2020-11-09 21:19:15 +00:00
parent d5d24b0e7e
commit ef02f13ef4

View File

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