fedimbed: pixelfed support

This commit is contained in:
Cynthia Foxwell 2025-01-30 15:23:52 -07:00
parent c17ff920ef
commit 91761034d6
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -28,6 +28,7 @@ const PATH_REGEX = {
gotosocial: /^\/@(.+?)\/statuses\/[0-9A-Z]+\/?/, gotosocial: /^\/@(.+?)\/statuses\/[0-9A-Z]+\/?/,
lemmy: /^\/post\/\d+\/?/, lemmy: /^\/post\/\d+\/?/,
honk: /^\/u\/(.+?)\/h\/(.+?)\/?/, honk: /^\/u\/(.+?)\/h\/(.+?)\/?/,
pixelfed: /^\/p\/(.+?)\/(.+?)\/?/,
cohost: /^\/[A-Za-z0-9]+\/post\/\d+-[A-Za-z0-9-]+\/?/, cohost: /^\/[A-Za-z0-9]+\/post\/\d+-[A-Za-z0-9-]+\/?/,
bluesky: BSKY_POST_REGEX, bluesky: BSKY_POST_REGEX,
}; };
@ -43,6 +44,7 @@ const PLATFORM_COLORS = {
lemmy: 0x14854f, lemmy: 0x14854f,
birdsitelive: 0x1da1f2, birdsitelive: 0x1da1f2,
iceshrimp: 0x8e82f9, // YCbCr interpolated as the accent color is a gradient iceshrimp: 0x8e82f9, // YCbCr interpolated as the accent color is a gradient
pixelfed: 0x10c5f8,
cohost: 0x83254f, cohost: 0x83254f,
bluesky: 0x0085ff, bluesky: 0x0085ff,
}; };
@ -59,6 +61,20 @@ const BSKY_DOMAINS = [
"bskyx.app", "bskyx.app",
]; ];
//eventually:tm:
/*const TW_DOMAINS = [
"tw.c7.pm",
"tw.counter-strike.gay",
"twitter.com",
"x.com",
"fxtwitter.com",
"fixupx.com",
"vxtwitter.com",
"fixvx.com",
"stupidpenisx.com",
"girlcockx.com",
];*/
const domainCache = new Map(); const domainCache = new Map();
domainCache.set("cohost.org", "cohost"); // no nodeinfo domainCache.set("cohost.org", "cohost"); // no nodeinfo