Skip to content

Commit

Permalink
More websites/rules (fixes qsniyg#1079)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Mar 8, 2023
1 parent 20a599c commit 8f055b6
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 23 deletions.
60 changes: 48 additions & 12 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81844,18 +81844,6 @@ var $$IMU_EXPORT$$;
return src.replace(/\/storage\/+thumbs\/+/, "/storage/uploads/");
}

if (domain === "apollo-frankfurt.akamaized.net" ||
// https://apollo-virginia.akamaized.net/v1/files/cmgwghqdmduk3-GT/image%3Bp%3Dthumb
// https://apollo-virginia.akamaized.net/v1/files/cmgwghqdmduk3-GT/image
domain === "apollo-virginia.akamaized.net" ||
// https://apollo-singapore.akamaized.net/v1/files/jbyitvgly1na-PK/image;s=272x0
// https://apollo-singapore.akamaized.net/v1/files/jbyitvgly1na-PK/image
domain === "apollo-singapore.akamaized.net") {
// https://apollo-frankfurt.akamaized.net/v1/files/5lwmg93wkg212-KZ/image;s=261x203
// https://apollo-frankfurt.akamaized.net/v1/files/5lwmg93wkg212-KZ/image
return src.replace(/(\/files\/+[^/]*\/+image)(?:%3B|;)[^/]*(?:[?#].*)?$/, "$1");
}

if (domain_nosub === "jdmagicbox.com" && /^content[0-9]*\./.test(domain)) {
// https://content3.jdmagicbox.com/comp/delhi/l2/011pxx11.xx11.181201121520.n6l2/catalogue/guru-kirpa-gupta-properties-shastri-nagar-n-delhi-estate-agents-bhqcuqr44l-250.jpg
// https://content3.jdmagicbox.com/comp/delhi/l2/011pxx11.xx11.181201121520.n6l2/catalogue/guru-kirpa-gupta-properties-shastri-nagar-n-delhi-estate-agents-bhqcuqr44l.jpg
Expand Down Expand Up @@ -103186,6 +103174,54 @@ var $$IMU_EXPORT$$;
return decodeuri_ifneeded(newsrc);
}

if (domain_nosub === "olxcdn.com" ||
// https://apollo-virginia.akamaized.net/v1/files/cmgwghqdmduk3-GT/image%3Bp%3Dthumb
// https://apollo-virginia.akamaized.net/v1/files/cmgwghqdmduk3-GT/image;s=0x0;f=png
domain === "apollo-virginia.akamaized.net" ||
// https://apollo-frankfurt.akamaized.net/v1/files/5lwmg93wkg212-KZ/image;s=261x203
domain === "apollo-frankfurt.akamaized.net" ||
// https://apollo-singapore.akamaized.net/v1/files/0ana1bwntjfc1-IN/image;s=300x600;q=60
// https://apollo-singapore.akamaized.net/v1/files/0ana1bwntjfc1-IN/image;s=0x0;f=png
// https://apollo-singapore.akamaized.net/v1/files/0ana1bwntjfc1-IN/image%3bs=99x99
// https://apollo-singapore.akamaized.net/v1/files/0ana1bwntjfc1-IN/image;s=0x0;f=png
// https://apollo-singapore.akamaized.net/v1/files/jbyitvgly1na-PK/image;s=272x0
domain === "apollo-singapore.akamaized.net" ||
// https://apollo-ireland.akamaized.net/v1/files/7a4ysqoowqvx1-OLXAUTOTR/image;s=300x600;q=60
// https://apollo-ireland.akamaized.net/v1/files/7a4ysqoowqvx1-OLXAUTOTR/image;s=0x0;f=png -- 1280x873
domain === "apollo-ireland.akamaized.net") {
// thanks to karpuzikov and talizea on github: https://github.com/qsniyg/maxurl/issues/1079
// https://ireland.apollo.olxcdn.com/v1/files/6dxjbzpofcc23-UA/image;s=100x100
// https://ireland.apollo.olxcdn.com/v1/files/6dxjbzpofcc23-UA/image;s=0x0;f=png -- 3000x2250
// without ;f=png, it redirects to a webp image
// https://ireland.apollo.olxcdn.com/v1/files/6dxjbzpofcc23-UA/image;s=9999x9999
// https://ireland.apollo.olxcdn.com/v1/files/6dxjbzpofcc23-UA/image;s=0x0;f=png
// https://frankfurt.apollo.olxcdn.com/v1/files/iu7vefztbgp32-BG/image;s=1600x738
// https://frankfurt.apollo.olxcdn.com/v1/files/iu7vefztbgp32-BG/image;s=0x0;f=png
return src
.replace(/%3[Bb]/g, ";")
.replace(/(\/files\/+[^/]+\/+[^/?#;]+?)(?:[;?#].*)?$/, "$1;s=0x0;f=png");
}

if (domain === "d2t6nqpqpe59g5.cloudfront.net") {
// https://d2t6nqpqpe59g5.cloudfront.net/768x768xwebp/main-page/header-mobile.png
// https://d2t6nqpqpe59g5.cloudfront.net/768x768xjpg/main-page/header-mobile.png
// https://d2t6nqpqpe59g5.cloudfront.net/768x768xpng/main-page/header-mobile.png
// https://d2t6nqpqpe59g5.cloudfront.net/main-page/header-mobile.png
return src.replace(/(:\/\/[^/]+\/+)[0-9]+x[0-9]+x[a-z]+\/+/, "$1");
}

if (domain === "images.prop24.com" ||
// https://img.autotrader.co.za/22296736/Crop120x72
// https://img.autotrader.co.za/22296736
domain === "img.autotrader.co.za") {
// https://images.prop24.com/295454573/Crop525x350
// https://images.prop24.com/295454573
return {
url: src.replace(/(:\/\/[^/]+\/+[0-9]+)(?:\/+.*)?$/, "$1"),
can_head: false // 500
};
}




Expand Down
56 changes: 45 additions & 11 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -73573,17 +73573,6 @@ var $$IMU_EXPORT$$;
// https://recbook.com/storage/uploads/1884627720_1554863223.png
return src.replace(/\/storage\/+thumbs\/+/, "/storage/uploads/");
}
if (domain === "apollo-frankfurt.akamaized.net" ||
// https://apollo-virginia.akamaized.net/v1/files/cmgwghqdmduk3-GT/image%3Bp%3Dthumb
// https://apollo-virginia.akamaized.net/v1/files/cmgwghqdmduk3-GT/image
domain === "apollo-virginia.akamaized.net" ||
// https://apollo-singapore.akamaized.net/v1/files/jbyitvgly1na-PK/image;s=272x0
// https://apollo-singapore.akamaized.net/v1/files/jbyitvgly1na-PK/image
domain === "apollo-singapore.akamaized.net") {
// https://apollo-frankfurt.akamaized.net/v1/files/5lwmg93wkg212-KZ/image;s=261x203
// https://apollo-frankfurt.akamaized.net/v1/files/5lwmg93wkg212-KZ/image
return src.replace(/(\/files\/+[^/]*\/+image)(?:%3B|;)[^/]*(?:[?#].*)?$/, "$1");
}
if (domain_nosub === "jdmagicbox.com" && /^content[0-9]*\./.test(domain)) {
// https://content3.jdmagicbox.com/comp/delhi/l2/011pxx11.xx11.181201121520.n6l2/catalogue/guru-kirpa-gupta-properties-shastri-nagar-n-delhi-estate-agents-bhqcuqr44l-250.jpg
// https://content3.jdmagicbox.com/comp/delhi/l2/011pxx11.xx11.181201121520.n6l2/catalogue/guru-kirpa-gupta-properties-shastri-nagar-n-delhi-estate-agents-bhqcuqr44l.jpg
Expand Down Expand Up @@ -92453,6 +92442,51 @@ var $$IMU_EXPORT$$;
if (newsrc !== src)
return decodeuri_ifneeded(newsrc);
}
if (domain_nosub === "olxcdn.com" ||
// https://apollo-virginia.akamaized.net/v1/files/cmgwghqdmduk3-GT/image%3Bp%3Dthumb
// https://apollo-virginia.akamaized.net/v1/files/cmgwghqdmduk3-GT/image;s=0x0;f=png
domain === "apollo-virginia.akamaized.net" ||
// https://apollo-frankfurt.akamaized.net/v1/files/5lwmg93wkg212-KZ/image;s=261x203
domain === "apollo-frankfurt.akamaized.net" ||
// https://apollo-singapore.akamaized.net/v1/files/0ana1bwntjfc1-IN/image;s=300x600;q=60
// https://apollo-singapore.akamaized.net/v1/files/0ana1bwntjfc1-IN/image;s=0x0;f=png
// https://apollo-singapore.akamaized.net/v1/files/0ana1bwntjfc1-IN/image%3bs=99x99
// https://apollo-singapore.akamaized.net/v1/files/0ana1bwntjfc1-IN/image;s=0x0;f=png
// https://apollo-singapore.akamaized.net/v1/files/jbyitvgly1na-PK/image;s=272x0
domain === "apollo-singapore.akamaized.net" ||
// https://apollo-ireland.akamaized.net/v1/files/7a4ysqoowqvx1-OLXAUTOTR/image;s=300x600;q=60
// https://apollo-ireland.akamaized.net/v1/files/7a4ysqoowqvx1-OLXAUTOTR/image;s=0x0;f=png -- 1280x873
domain === "apollo-ireland.akamaized.net") {
// thanks to karpuzikov and talizea on github: https://github.com/qsniyg/maxurl/issues/1079
// https://ireland.apollo.olxcdn.com/v1/files/6dxjbzpofcc23-UA/image;s=100x100
// https://ireland.apollo.olxcdn.com/v1/files/6dxjbzpofcc23-UA/image;s=0x0;f=png -- 3000x2250
// without ;f=png, it redirects to a webp image
// https://ireland.apollo.olxcdn.com/v1/files/6dxjbzpofcc23-UA/image;s=9999x9999
// https://ireland.apollo.olxcdn.com/v1/files/6dxjbzpofcc23-UA/image;s=0x0;f=png
// https://frankfurt.apollo.olxcdn.com/v1/files/iu7vefztbgp32-BG/image;s=1600x738
// https://frankfurt.apollo.olxcdn.com/v1/files/iu7vefztbgp32-BG/image;s=0x0;f=png
return src
.replace(/%3[Bb]/g, ";")
.replace(/(\/files\/+[^/]+\/+[^/?#;]+?)(?:[;?#].*)?$/, "$1;s=0x0;f=png");
}
if (domain === "d2t6nqpqpe59g5.cloudfront.net") {
// https://d2t6nqpqpe59g5.cloudfront.net/768x768xwebp/main-page/header-mobile.png
// https://d2t6nqpqpe59g5.cloudfront.net/768x768xjpg/main-page/header-mobile.png
// https://d2t6nqpqpe59g5.cloudfront.net/768x768xpng/main-page/header-mobile.png
// https://d2t6nqpqpe59g5.cloudfront.net/main-page/header-mobile.png
return src.replace(/(:\/\/[^/]+\/+)[0-9]+x[0-9]+x[a-z]+\/+/, "$1");
}
if (domain === "images.prop24.com" ||
// https://img.autotrader.co.za/22296736/Crop120x72
// https://img.autotrader.co.za/22296736
domain === "img.autotrader.co.za") {
// https://images.prop24.com/295454573/Crop525x350
// https://images.prop24.com/295454573
return {
url: src.replace(/(:\/\/[^/]+\/+[0-9]+)(?:\/+.*)?$/, "$1"),
can_head: false // 500
};
}
// -- general rules --
if (src.match(/\/ImageGen\.ashx\?/)) {
// http://www.lookalikes.info/umbraco/ImageGen.ashx?image=/media/97522/nick%20hewer%20-%20mark%20brown.jpeg&width=250&constrain=true
Expand Down

0 comments on commit 8f055b6

Please sign in to comment.