Open all item links in new tab
This commit is contained in:
parent
bc8649fac3
commit
9db8ef59c0
@ -56,6 +56,10 @@ class FeedItem extends HTMLElement {
|
|||||||
.then(item => {
|
.then(item => {
|
||||||
template.innerHTML += item.Content || item.Description;
|
template.innerHTML += item.Content || item.Description;
|
||||||
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
||||||
|
[...this.shadowRoot.querySelectorAll('a[href^=http]')].forEach(a => {
|
||||||
|
a.setAttribute("target", "_blank");
|
||||||
|
a.setAttribute("rel", "noopener");
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user