Fixed sub_frame or instagram #166

This commit is contained in:
ManeraKai 2022-04-19 17:04:36 +03:00
parent c767a39b2c
commit 8fb929399e
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
2 changed files with 11 additions and 2 deletions

View File

@ -105,7 +105,16 @@ function redirect(url, type, initiator) {
if (!targets.includes(url.host)) return;
if (type !== "main_frame" || bypassPaths.some(rx => rx.test(url.pathname))) return;
if (![
"main_frame",
"sub_frame",
"xmlhttprequest",
"other",
"image",
"media",
].includes(type)) return null;
if (bypassPaths.some(rx => rx.test(url.pathname))) return;
let instancesList;
if (protocol == 'normal') instancesList = [...bibliogramNormalRedirectsChecks, ...bibliogramNormalCustomRedirects];

View File

@ -108,7 +108,7 @@ function redirect(url, type) {
if (instancesList.length === 0) return null;
let randomInstance = commonHelper.getRandomInstance(instancesList);
let pathName = url.pathname.replace(/@.*\/(?=video)/, "");
// let pathName = url.pathname.replace(/@.*\/(?=video)/, "");
return `${randomInstance}${url.pathname}`;
}