diff --git a/extension/entrypoints/options/sources.ts b/extension/entrypoints/options/sources.ts index fa0ed34..5920ab6 100644 --- a/extension/entrypoints/options/sources.ts +++ b/extension/entrypoints/options/sources.ts @@ -8,6 +8,7 @@ export type SourceDescriptor = { export const SOURCE_APPS: SourceDescriptor[] = [ { id: 'bluesky', name: 'Bluesky', host: 'bsky.app' }, + { id: 'bluepy', name: 'Bluepy', host: 'bluepy.social' }, { id: 'blacksky', name: 'Blacksky', host: 'blacksky.community' }, { id: 'reddwarf', name: 'Red Dwarf', host: 'reddwarf.app' }, { id: 'witchsky', name: 'Witchsky', host: 'witchsky.app' }, diff --git a/extension/lib/homePage.ts b/extension/lib/homePage.ts index 9344731..17600f5 100644 --- a/extension/lib/homePage.ts +++ b/extension/lib/homePage.ts @@ -9,6 +9,7 @@ const BUILTIN_HOME: Record = { aturi: 'https://aturi.to/', anisota: 'https://anisota.net/', bluesky: 'https://bsky.app/', + bluepy: 'https://bluepy.social/', blacksky: 'https://blacksky.community/', reddwarf: 'https://reddwarf.app/', leaflet: 'https://leaflet.pub/', diff --git a/extension/lib/rules.ts b/extension/lib/rules.ts index 49e52b6..c55fcfa 100644 --- a/extension/lib/rules.ts +++ b/extension/lib/rules.ts @@ -67,6 +67,31 @@ function sourceRecipes(sourceId: SourceApp | string): SourceRecipe[] { ]; } + case 'bluepy': { + const host = HOST_BY_SOURCE.bluepy; + const base = `^https://${escapeHost(host)}/at:/+([^/?#]+)`; + return [ + { + regexFilter: `${base}/app\\.bsky\\.feed\\.post/([^/?#]+).*`, + capturesLabel: 'bluepy:post', + tokens: { handle: 1, rkey: 2 }, + type: 'post', + }, + { + regexFilter: `${base}/app\\.bsky\\.graph\\.list/([^/?#]+).*`, + capturesLabel: 'bluepy:list', + tokens: { handle: 1, rkey: 2 }, + type: 'list', + }, + { + regexFilter: `${base}/app\\.bsky\\.actor\\.profile/self/?.*`, + capturesLabel: 'bluepy:profile', + tokens: { handle: 1 }, + type: 'profile', + }, + ]; + } + case 'pinksky': { return [ { @@ -173,6 +198,7 @@ function sourceRecipes(sourceId: SourceApp | string): SourceRecipe[] { const HOST_BY_SOURCE: Record = { bluesky: 'bsky.app', + bluepy: 'bluepy.social', blacksky: 'blacksky.community', reddwarf: 'reddwarf.app', witchsky: 'witchsky.app', @@ -339,6 +365,7 @@ export function buildRules(prefs: Prefs, opts: BuildRulesOptions = {}): Redirect const ALL_KNOWN_SOURCES: SourceApp[] = [ 'bluesky', + 'bluepy', 'blacksky', 'reddwarf', 'witchsky',