kopia lustrzana https://github.com/cheeaun/phanpy
Unfurl castopod links
rodzic
4b0f523667
commit
a3fc396738
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue