mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Make the tweet a single child in the parent class=tweet element even there are more than one twitter links in it
This commit is contained in:
parent
64673bd6db
commit
ff87371d21
1 changed files with 2 additions and 2 deletions
|
|
@ -2209,7 +2209,7 @@ Readability.prototype = {
|
|||
for (const element of Array.from(e.getElementsByTagName('a'))) {
|
||||
|
||||
if (this.isEmbed(element)) {
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
|
||||
// Create tweets placeholders from links
|
||||
|
|
@ -2223,7 +2223,7 @@ Readability.prototype = {
|
|||
tweet.innerText = 'Tweet placeholder';
|
||||
tweet.className = 'tweet-placeholder';
|
||||
tweet.setAttribute('data-tweet-id', match[2]);
|
||||
element.parentNode.replaceChild(tweet, element);
|
||||
element.parentNode.replaceChildren(tweet);
|
||||
|
||||
// remove all containers the tweet is nested in (if they contain the tweet only)
|
||||
let tweetParent = tweet.parentElement || tweet.parentNode;
|
||||
|
|
|
|||
Loading…
Reference in a new issue