Filter out empty paragraphs
This commit is contained in:
1 parent
d5d24b0e7e
commit
ef02f13ef4
1 file changed
+5
@@ -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();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user