fix: don't redirect redd.it for teddit

redd.it redirects don't work for teddit, so don't do it.
This commit is contained in:
Jason Kim 2021-04-22 21:07:32 -07:00
parent 68a89b1c0c
commit 9fc3fccf65
1 changed files with 6 additions and 0 deletions

View File

@ -482,6 +482,12 @@ function redirectReddit(url, initiator, type) {
} else {
return null;
}
} 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;
}
}
return `${redditInstance}${url.pathname}${url.search}`;
}