MCPcopy Create free account
hub / github.com/dailydotdev/apps / isOutsideLink

Function isOutsideLink

packages/shared/src/components/shell/readingStore.ts:98–99  ·  view source on GitHub ↗
(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.
98export const isOutsideLink = (anchor: HTMLAnchorElement): boolean =>
99 /^https?:$/.test(anchor.protocol) && !appHosts().includes(anchor.host);
100
101const shareIntents =
102 /^(?:[a-z0-9-]+\.)?(?:twitter\.com|x\.com|facebook\.com|linkedin\.com|reddit\.com|wa\.me|whatsapp\.com|t\.me|telegram\.me)$/;

Callers 2

onClickFunction · 0.90
onClickFunction · 0.90

Calls 1

appHostsFunction · 0.85

Tested by

no test coverage detected