Fix truncated Tumblr identifiers for some mentions

This commit is contained in:
shinigami-eyes 2020-12-26 06:55:45 +00:00
parent ecc8719776
commit 194dd1fb5f

View File

@ -429,7 +429,7 @@ function getIdentifierFromElementImpl(element: HTMLAnchorElement, originalTarget
if (element.classList.contains('interlanguage-link-target')) return null; if (element.classList.contains('interlanguage-link-target')) return null;
} }
if (element.classList.contains('tumblelog')) return element.textContent.substr(1) + '.tumblr.com'; if (element.classList.contains('tumblelog')) return element.textContent.replace('@', '') + '.tumblr.com';
const href = element.href; const href = element.href;
if (href && (!href.endsWith('#') || href.includes('&stick='))) return getIdentifierFromURLImpl(tryParseURL(href)); if (href && (!href.endsWith('#') || href.includes('&stick='))) return getIdentifierFromURLImpl(tryParseURL(href));