Proposal
When a comment or post body contains a link to reddit.com/r/<sub>/comments/<id> or old.reddit.com/..., rewrite it to a relative lurker URL (/comments/<id>) so users stay inside lurker. Bare subreddit references (/r/foo, r/foo) similarly become relative.
Where
Extend src/extlinks.js — likely a new transformation in resolveExternalInlineLinks that pattern-matches reddit URLs and rewrites the href.
Patterns to handle
https://reddit.com/r/<sub>/comments/<id> → /comments/<id>
https://reddit.com/r/<sub>/comments/<id>/_/<comment_id> → /comments/<id>/comment/<comment_id>
https://www.reddit.com/... and https://old.reddit.com/... — same rewriting
https://reddit.com/r/<sub> → /r/<sub>
/r/<sub> (already relative-ish) → stays as /r/<sub> (matches lurker's existing routes)
r/<sub> (bare in text) → linkify to /r/<sub>
u/<user> — out of scope unless lurker grows user pages
Acceptance
Clicking any reddit-domain link in a comment body navigates within lurker rather than out to reddit.com.
Proposal
When a comment or post body contains a link to
reddit.com/r/<sub>/comments/<id>orold.reddit.com/..., rewrite it to a relative lurker URL (/comments/<id>) so users stay inside lurker. Bare subreddit references (/r/foo,r/foo) similarly become relative.Where
Extend
src/extlinks.js— likely a new transformation inresolveExternalInlineLinksthat pattern-matches reddit URLs and rewrites the href.Patterns to handle
https://reddit.com/r/<sub>/comments/<id>→/comments/<id>https://reddit.com/r/<sub>/comments/<id>/_/<comment_id>→/comments/<id>/comment/<comment_id>https://www.reddit.com/...andhttps://old.reddit.com/...— same rewritinghttps://reddit.com/r/<sub>→/r/<sub>/r/<sub>(already relative-ish) → stays as/r/<sub>(matches lurker's existing routes)r/<sub>(bare in text) → linkify to/r/<sub>u/<user>— out of scope unless lurker grows user pagesAcceptance
Clicking any reddit-domain link in a comment body navigates within lurker rather than out to reddit.com.