Support snac2 links

This commit is contained in:
Lim Chee Aun 2025-03-07 12:13:23 +08:00
parent 7a4ebd0930
commit 4e8745e410

View file

@ -13,6 +13,7 @@ export default function isMastodonLinkMaybe(url) {
/^\/ap\/note\/[a-z0-9\-_]+$/i.test(pathname) || // BotKit, Fedify
(/(fed|bsky)\.brid\.gy/i.test(hostname) &&
pathname.startsWith('/r/http')) || // Bridgy Fed
/^\/[^\/]+\/p\/\d+\.\d+$/i.test(pathname) || // snac2
/#\/[^\/]+\.[^\/]+\/s\/.+/i.test(hash) // Phanpy 🫣
);
} catch (e) {