From cd9ad2bb7e47cdbbdcc616b48b2999db5afa1646 Mon Sep 17 00:00:00 2001 From: Damien Erambert Date: Mon, 12 Sep 2016 07:55:41 -0700 Subject: [PATCH] :wrench: hide media link only if it ends the tweet fixes #97 --- src/js/content.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/js/content.js b/src/js/content.js index 4cb82e15d..6d92d3290 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -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'); + }); } /**