removed bypassing root path on medium, imgur
This commit is contained in:
parent
0ab646ac68
commit
1056f98ac3
|
@ -105,7 +105,6 @@ function all() {
|
|||
|
||||
function redirect(url, type, initiator) {
|
||||
if (disableImgur) return;
|
||||
if (url.pathname == "/") return;
|
||||
if (!["main_frame", "sub_frame", "xmlhttprequest", "other", "image", "media",].includes(type)) return;
|
||||
if (initiator && (all().includes(initiator.origin) || targets.test(initiator.host))) return;
|
||||
if (!targets.test(url.href)) return;
|
||||
|
|
|
@ -99,7 +99,7 @@ function redirect(url, type, initiator) {
|
|||
].includes(initiator.origin))) return;
|
||||
|
||||
if (!targets.some(rx => rx.test(url.host))) return;
|
||||
if (/^\/($|@[a-zA-Z.]{0,}(\/|)$)/.test(url.pathname)) return;
|
||||
if (/^\/(@[a-zA-Z.]{0,}(\/|)$)/.test(url.pathname)) return;
|
||||
|
||||
let instancesList;
|
||||
if (mediumProtocol == 'normal') instancesList = [...scribeNormalRedirectsChecks, ...scribeNormalCustomRedirects];
|
||||
|
|
Loading…
Reference in New Issue