about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-04-04 19:29:06 +0300
committerManeraKai <manerakai@protonmail.com>2022-04-04 19:29:06 +0300
commit2ab816509d2776e0109bdee8dd68088e12194368 (patch)
tree2e38fb9167666d62d2d156f2c03b0ca3a90cfc14
parentSeperated SearX and SearXNG in code #120 (diff)
downloadlibredirect-2ab816509d2776e0109bdee8dd68088e12194368.zip
Fixed a medium exception #137
-rw-r--r--src/assets/javascripts/helpers/medium.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/assets/javascripts/helpers/medium.js b/src/assets/javascripts/helpers/medium.js
index 53dd9555..0d7abc8c 100644
--- a/src/assets/javascripts/helpers/medium.js
+++ b/src/assets/javascripts/helpers/medium.js
@@ -117,14 +117,13 @@ function setProtocol(val) {
 function redirect(url, type, initiator) {
 
   if (disable) return;
-  if (url.pathname == "/") return;
-  if (url.pathname.startsWith("/tag") || url.pathname.startsWith("/@")) return;
 
   if (type != "main_frame" && "sub_frame" && "xmlhttprequest" && "other") return null;
 
   if (initiator && ([...redirects.scribe.normal, ...scribeNormalCustomRedirects].includes(initiator.origin))) return;
 
   if (!targets.some(rx => rx.test(url.host))) return;
+  if (/^https?:\/{2}([a-z](\.|)){0,}\/(@([a-z](\.|)){0,}\/$|[^@])/.test(url.href)) return;
 
   let instancesList;
   if (protocol == 'normal') instancesList = [...scribeNormalRedirectsChecks, ...scribeNormalCustomRedirects];