⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.
TypeScript agenticagileai-agentsbug-reportingbug-trackerganttissue-trackerjirajira-alternativekanbanlinearlinear-alternativeopen-sourceproduct-managementproject-managementroadmapself-hostedsprint-planningteam-collaborationtrello-alternative
export function previewableLink(target: EventTarget | null, root: HTMLElement) {
if (!(target instanceof Element)) return null;
const link = target.closest<HTMLAnchorElement>('a[href]');
if (!link || !root.contains(link) || link.hasAttribute('download')) return null;
try {
const url = new URL(link.href);
if (!['http:', 'https:'].includes(url.protocol) || url.username || url.password) return null;
return link;
} catch {
return null;
}
}