Add feed sharing
This commit is contained in:
parent
84990c509e
commit
1ecf0da81b
5 changed files with 141 additions and 48 deletions
|
@ -82,6 +82,18 @@ export function isBskyPostUrl(url: string): boolean {
|
|||
return false
|
||||
}
|
||||
|
||||
export function isBskyCustomFeedUrl(url: string): boolean {
|
||||
if (isBskyAppUrl(url)) {
|
||||
try {
|
||||
const urlp = new URL(url)
|
||||
return /profile\/(?<name>[^/]+)\/feed\/(?<rkey>[^/]+)/i.test(
|
||||
urlp.pathname,
|
||||
)
|
||||
} catch {}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export function convertBskyAppUrlIfNeeded(url: string): string {
|
||||
if (isBskyAppUrl(url)) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue