Fixed a medium exception #137

This commit is contained in:
ManeraKai 2022-04-04 19:29:06 +03:00
parent d731d94a2d
commit 2ab816509d
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
1 changed files with 1 additions and 2 deletions

View File

@ -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];