summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Kim <git@jasonk.me>2021-04-09 00:00:42 -0700
committerJason Kim <git@jasonk.me>2021-04-09 00:00:42 -0700
commite86895b00882d900e9d828a852df54d87211c988 (patch)
treeeb2cf07d04b3c80e68949a1003c33199fc79cb9d
parent123cca4e5cda2e0dfb42b3b41bf7e1412279514e (diff)
downloadprivacy-redirect-e86895b00882d900e9d828a852df54d87211c988.tar.gz
privacy-redirect-e86895b00882d900e9d828a852df54d87211c988.tar.bz2
privacy-redirect-e86895b00882d900e9d828a852df54d87211c988.zip
fix: don't redirect for rest of instances
Unbreak old.reddit.com and i.reddit.com by ignoring image redirects for them.
-rw-r--r--src/pages/background/background.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pages/background/background.js b/src/pages/background/background.js
index bd2d04c..2534279 100644
--- a/src/pages/background/background.js
+++ b/src/pages/background/background.js
@@ -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}`;