Fix identifier extraction for Facebook search results

This commit is contained in:
shinigami-eyes 2020-12-26 06:56:48 +00:00
parent f1b18eead3
commit be906ee77a
1 changed files with 2 additions and 1 deletions

View File

@ -359,7 +359,8 @@ function getIdentifierFromElementImpl(element: HTMLAnchorElement, originalTarget
if (parent && parent.tagName == 'LI') return null;
// React post timestamp
if (element.getAttribute('role') == 'link' && parent && parent.tagName == 'SPAN' && firstChild && firstChild.tagName == 'SPAN') return null;
if (element.getAttribute('role') == 'link' && parent && parent.tagName == 'SPAN' && firstChild && firstChild.tagName == 'SPAN' && firstChild.tabIndex == 0)
return null;
// React big profile picture (user or page)
if (originalTarget instanceof SVGImageElement && isFacebookPictureLink(element) && !getMatchingAncestorByCss(element, '[role=article]')) {