Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
🔧 hide media link only if it ends the tweet
Browse files Browse the repository at this point in the history
fixes #97
  • Loading branch information
eramdam committed Sep 12, 2016
1 parent 373c39a commit cd9ad2b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,15 @@ function hideURLVisually(url, node) {
return;
}

anchors.forEach(a => a.classList.add('btd-isvishidden'));
anchors.forEach(a => {
const lastNode = [...a.parentNode.childNodes].pop();

if (lastNode !== a) {
return;
}

a.classList.add('btd-isvishidden');
});
}

/**
Expand Down

0 comments on commit cd9ad2b

Please sign in to comment.