mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-23 16:28:48 +01:00
Unfurl castopod links
This commit is contained in:
parent
4b0f523667
commit
a3fc396738
1 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,9 @@ export default function isMastodonLinkMaybe(url) {
|
|||
const { pathname, hash, hostname } = URL.parse(url);
|
||||
return (
|
||||
/^\/.*\/\d+$/i.test(pathname) ||
|
||||
/^\/(@[^/]+|users\/[^/]+)\/(statuses|posts)\/\w+\/?$/i.test(pathname) || // GoToSocial, Takahe
|
||||
/^\/(@[^/]+|users\/[^/]+)\/(statuses|posts)\/[\w-]+\/?$/i.test(
|
||||
pathname,
|
||||
) || // GoToSocial, Takahe, Castopod
|
||||
/^\/notes\/[a-z0-9]+$/i.test(pathname) || // Misskey, Firefish
|
||||
/^\/(notice|objects)\/[a-z0-9-]+$/i.test(pathname) || // Pleroma
|
||||
/^\/@[^/]+\/post\/[a-z0-9\-_]+$/i.test(pathname) || // Threads
|
||||
|
|
Loading…
Reference in a new issue