FIX: track links in onebox body if it's same as header link.

This commit is contained in:
Vinoth Kannan 2020-04-03 00:08:29 +05:30
parent 76610acb6f
commit e7e931b70b
1 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,13 @@ export function isValidLink($link) {
return false;
}
if ($link.closest(".onebox-result, .onebox-body").length) {
const $a = $link.closest(".onebox").find("header a");
if ($a[0] && $a[0].href === $link[0].href) {
return true;
}
}
return (
$link.hasClass("track-link") ||
$link.closest(".hashtag, .badge-category, .onebox-result, .onebox-body")