Fixed a medium exception #137
This commit is contained in:
parent
d731d94a2d
commit
2ab816509d
|
@ -117,14 +117,13 @@ function setProtocol(val) {
|
||||||
function redirect(url, type, initiator) {
|
function redirect(url, type, initiator) {
|
||||||
|
|
||||||
if (disable) return;
|
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 (type != "main_frame" && "sub_frame" && "xmlhttprequest" && "other") return null;
|
||||||
|
|
||||||
if (initiator && ([...redirects.scribe.normal, ...scribeNormalCustomRedirects].includes(initiator.origin))) return;
|
if (initiator && ([...redirects.scribe.normal, ...scribeNormalCustomRedirects].includes(initiator.origin))) return;
|
||||||
|
|
||||||
if (!targets.some(rx => rx.test(url.host))) 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;
|
let instancesList;
|
||||||
if (protocol == 'normal') instancesList = [...scribeNormalRedirectsChecks, ...scribeNormalCustomRedirects];
|
if (protocol == 'normal') instancesList = [...scribeNormalRedirectsChecks, ...scribeNormalCustomRedirects];
|
||||||
|
|
Loading…
Reference in New Issue