about summary refs log tree commit diff stats
path: root/src/assets/javascripts/reddit.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/assets/javascripts/reddit.js')
-rw-r--r--src/assets/javascripts/reddit.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/assets/javascripts/reddit.js b/src/assets/javascripts/reddit.js
index cec4ef9d..8872aaf3 100644
--- a/src/assets/javascripts/reddit.js
+++ b/src/assets/javascripts/reddit.js
@@ -230,8 +230,9 @@ function redirect(url, type, initiator) {
   if (disableReddit) return;
   if (!targets.some(rx => rx.test(url.href))) return;
   if (initiator && all().includes(initiator.origin)) return 'BYPASSTAB';
+  if (!["main_frame", "xmlhttprequest", "other", "image", "media"].includes(type)) return;
   const bypassPaths = /\/(gallery\/poll\/rpan\/settings\/topics)/;
-  if (type !== "main_frame" || url.pathname.match(bypassPaths)) return;
+  if (url.pathname.match(bypassPaths)) return;
 
   let libredditInstancesList;
   let tedditInstancesList;