mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-21 13:19:22 +01:00
Fix link detection
This commit is contained in:
parent
456d4f4ae8
commit
d55bd95c72
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
export default function isMastodonLinkMaybe(url) {
|
export default function isMastodonLinkMaybe(url) {
|
||||||
|
const { pathname } = new URL(url);
|
||||||
return (
|
return (
|
||||||
/^https:\/\/.*\/\d+$/i.test(url) ||
|
/^\/.*\/\d+$/i.test(pathname) || /^\/notes\/[a-z0-9]+$/i.test(pathname) // Misskey, Calckey
|
||||||
/^https:\/\/.*\/notes\/[a-z0-9]+$/i.test(url) // Misskey, Calckey
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue