|
|
|
@ -106,6 +106,7 @@ export default class StatusContent extends React.PureComponent { |
|
|
|
|
link.setAttribute('title', link.href); |
|
|
|
|
link.classList.add('unhandled-link'); |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
if (tagLinks && isLinkMisleading(link)) { |
|
|
|
|
// Add a tag besides the link to display its origin
|
|
|
|
|
|
|
|
|
@ -115,6 +116,10 @@ export default class StatusContent extends React.PureComponent { |
|
|
|
|
link.insertAdjacentText('beforeend', ' '); |
|
|
|
|
link.insertAdjacentElement('beforeend', tag); |
|
|
|
|
} |
|
|
|
|
} catch (TypeError) { |
|
|
|
|
// Just to be safe
|
|
|
|
|
if (tagLinks) link.removeAttribute('href'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
link.setAttribute('target', '_blank'); |
|
|
|
|