Handle GoToSocial links
This commit is contained in:
parent
05d9cc59ea
commit
db602147ab
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
||||||
export default function isMastodonLinkMaybe(url) {
|
export default function isMastodonLinkMaybe(url) {
|
||||||
const { pathname } = new URL(url);
|
const { pathname } = new URL(url);
|
||||||
return (
|
return (
|
||||||
/^\/.*\/\d+$/i.test(pathname) || /^\/notes\/[a-z0-9]+$/i.test(pathname) // Misskey, Calckey
|
/^\/.*\/\d+$/i.test(pathname) ||
|
||||||
|
/^\/@[^/]+\/statuses\/\w+$/i.test(pathname) || // GoToSocial
|
||||||
|
/^\/notes\/[a-z0-9]+$/i.test(pathname) // Misskey, Calckey
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue