diff options
author | ManeraKai <manerakai@protonmail.com> | 2022-04-04 19:29:06 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2022-04-04 19:29:06 +0300 |
commit | 2ab816509d2776e0109bdee8dd68088e12194368 (patch) | |
tree | 2e38fb9167666d62d2d156f2c03b0ca3a90cfc14 | |
parent | Seperated SearX and SearXNG in code #120 (diff) | |
download | libredirect-2ab816509d2776e0109bdee8dd68088e12194368.zip |
Fixed a medium exception #137
-rw-r--r-- | src/assets/javascripts/helpers/medium.js | 3 |
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]; |