Function
isOutsideLink
(anchor: HTMLAnchorElement)
Source from the content-addressed store, hash-verified
| 96 | // A web link that leaves the app: not one of its own pages, not a sign-in |
| 97 | // or share hand-off that belongs to the destination. |
| 98 | export const isOutsideLink = (anchor: HTMLAnchorElement): boolean => |
| 99 | /^https?:$/.test(anchor.protocol) && !appHosts().includes(anchor.host); |
| 100 | |
| 101 | const shareIntents = |
| 102 | /^(?:[a-z0-9-]+\.)?(?:twitter\.com|x\.com|facebook\.com|linkedin\.com|reddit\.com|wa\.me|whatsapp\.com|t\.me|telegram\.me)$/; |
Tested by
no test coverage detected