Something went wrong. Try again.
Browser extension: detect and subscribe to standard.site publications on ATProto substandard.blog
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778/** Parsed at:// URI. */export interface AtUri { did: string collection: string rkey: string}
/** site.standard.publication record value. */export interface PublicationRecord { $type: 'site.standard.publication' url: string name: string description?: string icon?: BlobRef}
/** site.standard.document record value. */export interface DocumentRecord { $type: 'site.standard.document' site: string title: string publishedAt: string path?: string description?: string}
export interface BlobRef { $type: 'blob' ref: { $link: string } mimeType: string size: number}
/** What we know about the publication behind a tab's page. */export interface PubInfo { uri: string did: string handle?: string pds: string record: PublicationRecord iconUrl?: string /** Confirmed via .well-known lookup at the publication's URL. */ verified: boolean}
export interface DocInfo { uri: string record: DocumentRecord}
/** * Why detection could not produce a definite answer. Distinct from "no * publication found": with an error set, pub/doc are unknown, not absent. */export type DetectionError = 'offline' | 'fetch-failed'
/** Per-tab detection result, held by the background worker. */export interface PageState { url: string fetchedAt: number pub?: PubInfo doc?: DocInfo /** Rkey of our subscription record, if subscribed. Null = known unsubscribed, undefined = unknown (e.g. logged out). */ subscriptionRkey?: string | null /** Set when detection itself failed rather than finding nothing. */ error?: DetectionError}
export interface SessionInfo { did: string handle?: string}
/** Messages between content script / popup and the background worker. */export type Msg = | { type: 'page-hints'; pubHint?: string; docHint?: string } | { type: 'get-state'; tabId: number; refresh?: boolean }