fix: don't redirect for rest of instances

Unbreak old.reddit.com and i.reddit.com by ignoring image redirects for
them.
This commit is contained in:
Jason Kim 2021-04-09 00:00:42 -07:00
parent 123cca4e5c
commit e86895b008

View File

@ -454,6 +454,8 @@ function redirectReddit(url, initiator, type) {
} else if (redditInstance.includes("teddit")) {
let pathWithoutSlash = url.pathname.slice(1);
return `${redditInstance}/pics/w:null_${pathWithoutSlash}${url.search}`
} else {
return null;
}
}
return `${redditInstance}${url.pathname}${url.search}`;