mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 01:08:50 +01:00
Remove dup regex, add another GTS url pattern
This commit is contained in:
parent
437d721c26
commit
1765defa56
1 changed files with 1 additions and 2 deletions
|
@ -3,9 +3,8 @@ export default function isMastodonLinkMaybe(url) {
|
||||||
const { pathname, hash } = new URL(url);
|
const { pathname, hash } = new URL(url);
|
||||||
return (
|
return (
|
||||||
/^\/.*\/\d+$/i.test(pathname) ||
|
/^\/.*\/\d+$/i.test(pathname) ||
|
||||||
/^\/@[^/]+\/(statuses|posts)\/\w+\/?$/i.test(pathname) || // GoToSocial, Takahe
|
/^\/(@[^/]+|users\/[^/]+)\/(statuses|posts)\/\w+\/?$/i.test(pathname) || // GoToSocial, Takahe
|
||||||
/^\/notes\/[a-z0-9]+$/i.test(pathname) || // Misskey, Firefish
|
/^\/notes\/[a-z0-9]+$/i.test(pathname) || // Misskey, Firefish
|
||||||
/^\/notes\/[a-z0-9]+$/i.test(pathname) || // Misskey, Calckey
|
|
||||||
/^\/(notice|objects)\/[a-z0-9-]+$/i.test(pathname) || // Pleroma
|
/^\/(notice|objects)\/[a-z0-9-]+$/i.test(pathname) || // Pleroma
|
||||||
/#\/[^\/]+\.[^\/]+\/s\/.+/i.test(hash) // Phanpy 🫣
|
/#\/[^\/]+\.[^\/]+\/s\/.+/i.test(hash) // Phanpy 🫣
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue