From bb6894cec54f746d76d8209ca25198881cf9d29b Mon Sep 17 00:00:00 2001 From: Jason Kim Date: Thu, 22 Apr 2021 22:16:41 -0700 Subject: [PATCH] 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. --- src/pages/background/background.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/background/background.js b/src/pages/background/background.js index 92502dc..82f65a2 100644 --- a/src/pages/background/background.js +++ b/src/pages/background/background.js @@ -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}`;