removed bypassing root path on medium, imgur

This commit is contained in:
ManeraKai 2022-06-11 13:24:24 +03:00
parent 0ab646ac68
commit 1056f98ac3
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
2 changed files with 1 additions and 2 deletions

View File

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

View File

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