feat: support teddit by adding /comments hint

Redirecting tedd.it links to teddit instances works when the link starts
with "/comments".  Add "/comments" to the path for teddit.
This commit is contained in:
Jason Kim 2021-04-22 22:16:41 -07:00
parent 24bf815516
commit bb6894cec5
1 changed files with 3 additions and 3 deletions

View File

@ -484,9 +484,9 @@ function redirectReddit(url, initiator, type) {
}
} else if (url.host === "redd.it") {
if (redditInstance.includes("teddit")) {
// As of 2021-04-22, redirects for teddit on redd.it links don't work:
// they take you to the home page.
return null;
// As of 2021-04-22, redirects for teddit redd.it links don't work out of
// the box. Prefixing the path with "/comments" seems to help.
return `${redditInstance}/comments${url.pathname}${url.search}`;
}
}
return `${redditInstance}${url.pathname}${url.search}`;