Skip to content

Commit

Permalink
More websites/rules
Browse files Browse the repository at this point in the history
Fixes #1321
  • Loading branch information
qsniyg committed May 5, 2024
1 parent d670e84 commit 030f609
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 6 deletions.
87 changes: 84 additions & 3 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42430,6 +42430,10 @@ var $$IMU_EXPORT$$;
// https://media.globalcitizen.org/thumbnails/e2/bf/e2bfb436-b68c-43f3-8e4c-9ebac4a4280f/elladj_hudson_0590.jpeg__1600x900_q85_crop_subsampling-2.jpg
// https://media.globalcitizen.org/e2/bf/e2bfb436-b68c-43f3-8e4c-9ebac4a4280f/elladj_hudson_0590.jpeg
domain === "media.globalcitizen.org" ||
// thanks to anonymous for reporting:
// https://www.kexp.org/media/filer_public_thumbnails/filer_public/7c/66/7c669136-fb7a-4164-b2f5-909b01453468/miapw_flight_facilities-web.png__800x500_q85_crop_subject_location-714%2C250_subsampling-2_upscale.jpg
// https://www.kexp.org/media/filer_public/7c/66/7c669136-fb7a-4164-b2f5-909b01453468/miapw_flight_facilities-web.png
(domain_nowww === "kexp.org" && /:\/\/[^/]+\/+media\//.test(src)) ||
// https://bento.cdn.pbs.org/hostedbento-prod/filer_public_thumbnails/filer_public/latinmusicusa/Artists/selena_16x9.jpg__1024x576_q85_subsampling-2.jpg
// https://bento.cdn.pbs.org/hostedbento-prod/filer_public/latinmusicusa/Artists/selena_16x9.jpg
domain === "bento.cdn.pbs.org") {
Expand Down Expand Up @@ -48747,7 +48751,8 @@ var $$IMU_EXPORT$$;
domain_nowww === "fortunapost.com" ||
// http://flyhighstore.pl/2210-home_default/fh-cool-red-winter-jacket.jpg
// http://flyhighstore.pl/2210/fh-cool-red-winter-jacket.jpg
domain_nowww === "flyhighstore.pl") {
domain_nowww === "flyhighstore.pl" ||
/^[a-z]+:\/\/[^/]+\/+[0-9]+-(?:home|large|thickbox)_default\/+[^/.]+\.jpg(?:[?#].*)?$/.test(src)) {
// https://www.tiarashop.eu/3412-home_default/o.jpg
// https://www.tiarashop.eu/3412/o.jpg
newsrc = src.replace(/(\/img\/+p\/+(?:[0-9]\/+){1,}[0-9]+)[-_][^/.]*(\.[^/.]*)$/, "$1$2");
Expand Down Expand Up @@ -67692,7 +67697,10 @@ var $$IMU_EXPORT$$;
if (domain === "m.smedata.sk") {
// https://m.smedata.sk/api-media/media/image/sme/3/15/153563/153563_1000x.jpg?rev=1
// https://m.smedata.sk/api-media/media/image/sme/3/15/153563/153563.jpg?rev=1
return src.replace(/(\/api-media\/media\/image\/.*)_[0-9]+x(\.[^/.]*)$/, "$1$2");
// thanks to anonymous for reporting:
// https://m.smedata.sk/api-media/media/image/sme/5/21/212945/212945_970x647.jpg?rev=1
// https://m.smedata.sk/api-media/media/image/sme/5/21/212945/212945.jpg?rev=1
return src.replace(/(\/api-media\/media\/image\/.*)_[0-9]+x[0-9]*(\.[^/.]*)$/, "$1$2");
}

if ((domain_nosub === "diariolibre.com" && domain.match(/estatico[0-9]*\.diariolibre\.com/)) ||
Expand Down Expand Up @@ -72263,6 +72271,10 @@ var $$IMU_EXPORT$$;
// http://cdni.shavedpics.com/300/5/238/48003706/48003706_001_c92f.jpg
// http://cdni.shavedpics.com/1280/5/238/48003706/48003706_001_c92f.jpg
domain === "cdni.shavedpics.com" ||
// thanks to anonymous for reporting:
// https://cdni.hotnudegirls.net/460/7/272/40857805/40857805_001_4910.jpg
// https://cdni.hotnudegirls.net/1280/7/272/40857805/40857805_001_4910.jpg
domain === "cdni.hotnudegirls.net" ||
// https://cdni.pornpics.com/300/5/167/30752091/30752091_001_2e7f.jpg
// https://cdni.pornpics.com/1280/5/167/30752091/30752091_001_2e7f.jpg
domain === "cdni.pornpics.com") {
Expand Down Expand Up @@ -106448,7 +106460,14 @@ var $$IMU_EXPORT$$;
// https://i.natgeofe.com/k/a2a738a9-e019-4911-98e6-17f31c45ac88/milky-way-2.jpg
// https://i.natgeofe.com/n/bfec083e-ac57-4c17-8af1-3e8b322df8e0/NGM%20Ballesta%20Underwater-1.jpg?w=1200
// https://i.natgeofe.com/n/bfec083e-ac57-4c17-8af1-3e8b322df8e0/NGM%20Ballesta%20Underwater-1.jpg
return src.replace(/(:\/\/[^/]+\/+[a-z]\/+[-0-9a-f]{10,}\/+[^/?#]+)(?:[?#].*)?$/, "$1");
newsrc = src.replace(/(:\/\/[^/]+\/+[a-z]\/+[-0-9a-f]{10,}\/+[^/?#]+)(?:[?#].*)?$/, "$1");
if (newsrc !== src)
return newsrc;

// thanks to anonymous for reporting:
// https://i.natgeofe.com/n/1c613e49-a7e5-4c9f-8417-74a40c1ee272/02-typhoid-mary_square.jpg
// https://i.natgeofe.com/n/1c613e49-a7e5-4c9f-8417-74a40c1ee272/02-typhoid-mary.jpg
return src.replace(/(:\/\/[^/]+\/+[a-z]\/+[-0-9a-f]{10,}\/+[^/?#]+?)_square(\.[a-z]+)$/, "$1$2");
}

if (domain === "imgr.search.brave.com" ||
Expand Down Expand Up @@ -113805,6 +113824,68 @@ var $$IMU_EXPORT$$;
return src.replace(/(\/storage\/+cache\/+.*?)\.thumb[0-9]+\.webp/, "$1.jpg");
}

if (domain === "app.fanfix.io") {
// thanks to remlap for reporting:
// https://app.fanfix.io/static/images/circular_window_white.png
if (/\/static\/+images\/+circular_window_white\./.test(src)) {
return {
url: src,
bad: "mask"
};
}
}

if (domain === "cms.rsa-media.de") {
// thanks to anonymous for reporting:
// https://cms.rsa-media.de/uploads/large_09_rsamgmt_Patrick_fcec455cc6.jpeg
// https://cms.rsa-media.de/uploads/09_rsamgmt_Patrick_fcec455cc6.jpeg -- 3100x2067
return src.replace(/(\/uploads\/+)(?:small|medium|large)_([^/]+)(?:[?#].*)?$/, "$1$2");
}

if (domain_nosub === "lemmecheck.com" && /^cdn[0-9]*\./.test(domain)) {
// thanks to anonymous for reporting:
// https://cdn2.lemmecheck.com/lmccom/uploads/2023/05/princess-alice-in-presenting-princess-alice-by-mytro-for-metart-5-300x450.jpg
// https://cdn2.lemmecheck.com/lmccom/uploads/2023/05/princess-alice-in-presenting-princess-alice-by-mytro-for-metart-5.jpg
return {
url: src.replace(/-[0-9]+x[0-9]+(\.[^/.]+)(?:[?#].*)?$/, "$1"),
headers: {
Referer: "https://www.lemmecheck.com/"
}
};
}

if (domain_nowww === "irrgangfinearts.de") {
// thanks to anonymous for reporting:
// https://www.irrgangfinearts.de/media/image/product/21044/lg/l202200335.webp
// https://www.irrgangfinearts.de/media/image/product/21044/xl/l202200335.webp
// https://www.irrgangfinearts.de/media/image/product/21044/xl/l202200335.png
return src
.replace(/(\/xl\/+l[0-9]+\.)(?:webp|jpg)(?:[?#].*)?$/, "$1png")
.replace(/(\/media\/+image\/+product\/+[0-9]+\/+)(?:sm|md|lg)\/+/, "$1xl/");
}

if (domain === "photos.psychologytoday.com") {
// thanks to anonymous for reporting:
// https://photos.psychologytoday.com/3b72b3f7-46cd-11ea-a6ad-06142c356176/6/320x400.jpeg
// https://photos.psychologytoday.com/3b72b3f7-46cd-11ea-a6ad-06142c356176/6/original.jpeg
return src.replace(/(\/[-0-9a-f]{10,}\/+[0-9a-f]+\/+)[0-9]+x[0-9]+\./, "$1original.");
}

if (domain === "imagenes.cronica.com.mx" ||
// https://imghandler.cronica.com.mx/files/image_948_465/files/fp/uploads/2024/05/04/6636c21b5dafb.jpeg
// https://imagenes.cronica.com.mx/uploads/2024/05/04/6636c21b5dafb.jpeg
domain === "imghandler.cronica.com.mx") {
// thanks to sn3akyb3ar on github: https://github.com/qsniyg/maxurl/issues/1321
// https://imagenes.cronica.com.mx/files/image_948_465/files/fp/uploads/2024/05/04/6636c21b5dafb.r_d.974-506-4938.jpeg
// https://imagenes.cronica.com.mx/files/image_948_465/files/fp/uploads/2024/05/04/6636c21b5dafb.jpeg
// https://imagenes.cronica.com.mx/uploads/2024/05/04/6636c21b5dafb.jpeg
// https://imagenes.cronica.com.mx/files/content_image_desktop_filter/uploads/2024/05/04/6636c5b6a654c.jpeg
// https://imagenes.cronica.com.mx/uploads/2024/05/04/6636c5b6a654c.jpeg
return src
.replace(/:\/\/[^/]+\/+.*?\/(uploads\/+[0-9]{4}\/+(?:[0-9]{2}\/+){2}[0-9a-f]{5,}\.[a-z]+)(?:[?#].*)?/, "://imagenes.cronica.com.mx/$1")
.replace(/(\/uploads\/+[0-9]{4}\/+(?:[0-9]{2}\/+){2}[0-9a-f]{5,}\.)[^/?#]+\.([a-z]+)(?:[?#].*)?$/, "$1$2");
}




Expand Down
80 changes: 77 additions & 3 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -38813,6 +38813,10 @@ var $$IMU_EXPORT$$;
// https://media.globalcitizen.org/thumbnails/e2/bf/e2bfb436-b68c-43f3-8e4c-9ebac4a4280f/elladj_hudson_0590.jpeg__1600x900_q85_crop_subsampling-2.jpg
// https://media.globalcitizen.org/e2/bf/e2bfb436-b68c-43f3-8e4c-9ebac4a4280f/elladj_hudson_0590.jpeg
domain === "media.globalcitizen.org" ||
// thanks to anonymous for reporting:
// https://www.kexp.org/media/filer_public_thumbnails/filer_public/7c/66/7c669136-fb7a-4164-b2f5-909b01453468/miapw_flight_facilities-web.png__800x500_q85_crop_subject_location-714%2C250_subsampling-2_upscale.jpg
// https://www.kexp.org/media/filer_public/7c/66/7c669136-fb7a-4164-b2f5-909b01453468/miapw_flight_facilities-web.png
(domain_nowww === "kexp.org" && /:\/\/[^/]+\/+media\//.test(src)) ||
// https://bento.cdn.pbs.org/hostedbento-prod/filer_public_thumbnails/filer_public/latinmusicusa/Artists/selena_16x9.jpg__1024x576_q85_subsampling-2.jpg
// https://bento.cdn.pbs.org/hostedbento-prod/filer_public/latinmusicusa/Artists/selena_16x9.jpg
domain === "bento.cdn.pbs.org") {
Expand Down Expand Up @@ -44503,7 +44507,8 @@ var $$IMU_EXPORT$$;
domain_nowww === "fortunapost.com" ||
// http://flyhighstore.pl/2210-home_default/fh-cool-red-winter-jacket.jpg
// http://flyhighstore.pl/2210/fh-cool-red-winter-jacket.jpg
domain_nowww === "flyhighstore.pl") {
domain_nowww === "flyhighstore.pl" ||
/^[a-z]+:\/\/[^/]+\/+[0-9]+-(?:home|large|thickbox)_default\/+[^/.]+\.jpg(?:[?#].*)?$/.test(src)) {
// https://www.tiarashop.eu/3412-home_default/o.jpg
// https://www.tiarashop.eu/3412/o.jpg
newsrc = src.replace(/(\/img\/+p\/+(?:[0-9]\/+){1,}[0-9]+)[-_][^/.]*(\.[^/.]*)$/, "$1$2");
Expand Down Expand Up @@ -61391,7 +61396,10 @@ var $$IMU_EXPORT$$;
if (domain === "m.smedata.sk") {
// https://m.smedata.sk/api-media/media/image/sme/3/15/153563/153563_1000x.jpg?rev=1
// https://m.smedata.sk/api-media/media/image/sme/3/15/153563/153563.jpg?rev=1
return src.replace(/(\/api-media\/media\/image\/.*)_[0-9]+x(\.[^/.]*)$/, "$1$2");
// thanks to anonymous for reporting:
// https://m.smedata.sk/api-media/media/image/sme/5/21/212945/212945_970x647.jpg?rev=1
// https://m.smedata.sk/api-media/media/image/sme/5/21/212945/212945.jpg?rev=1
return src.replace(/(\/api-media\/media\/image\/.*)_[0-9]+x[0-9]*(\.[^/.]*)$/, "$1$2");
}
if ((domain_nosub === "diariolibre.com" && domain.match(/estatico[0-9]*\.diariolibre\.com/)) ||
// https://www.expreso.ec/binrepository/618x412/0c0/0d0/none/12113/VMQD/image_content_26442762_20181215203655.jpg
Expand Down Expand Up @@ -65442,6 +65450,10 @@ var $$IMU_EXPORT$$;
// http://cdni.shavedpics.com/300/5/238/48003706/48003706_001_c92f.jpg
// http://cdni.shavedpics.com/1280/5/238/48003706/48003706_001_c92f.jpg
domain === "cdni.shavedpics.com" ||
// thanks to anonymous for reporting:
// https://cdni.hotnudegirls.net/460/7/272/40857805/40857805_001_4910.jpg
// https://cdni.hotnudegirls.net/1280/7/272/40857805/40857805_001_4910.jpg
domain === "cdni.hotnudegirls.net" ||
// https://cdni.pornpics.com/300/5/167/30752091/30752091_001_2e7f.jpg
// https://cdni.pornpics.com/1280/5/167/30752091/30752091_001_2e7f.jpg
domain === "cdni.pornpics.com") {
Expand Down Expand Up @@ -95574,7 +95586,13 @@ var $$IMU_EXPORT$$;
// https://i.natgeofe.com/k/a2a738a9-e019-4911-98e6-17f31c45ac88/milky-way-2.jpg
// https://i.natgeofe.com/n/bfec083e-ac57-4c17-8af1-3e8b322df8e0/NGM%20Ballesta%20Underwater-1.jpg?w=1200
// https://i.natgeofe.com/n/bfec083e-ac57-4c17-8af1-3e8b322df8e0/NGM%20Ballesta%20Underwater-1.jpg
return src.replace(/(:\/\/[^/]+\/+[a-z]\/+[-0-9a-f]{10,}\/+[^/?#]+)(?:[?#].*)?$/, "$1");
newsrc = src.replace(/(:\/\/[^/]+\/+[a-z]\/+[-0-9a-f]{10,}\/+[^/?#]+)(?:[?#].*)?$/, "$1");
if (newsrc !== src)
return newsrc;
// thanks to anonymous for reporting:
// https://i.natgeofe.com/n/1c613e49-a7e5-4c9f-8417-74a40c1ee272/02-typhoid-mary_square.jpg
// https://i.natgeofe.com/n/1c613e49-a7e5-4c9f-8417-74a40c1ee272/02-typhoid-mary.jpg
return src.replace(/(:\/\/[^/]+\/+[a-z]\/+[-0-9a-f]{10,}\/+[^/?#]+?)_square(\.[a-z]+)$/, "$1$2");
}
if (domain === "imgr.search.brave.com" ||
// thanks to anonymous for reporting:
Expand Down Expand Up @@ -102173,6 +102191,62 @@ var $$IMU_EXPORT$$;
// https://kaupokalda.com/storage/cache/6d/2f/d9/kaupokalda-com-20220821-135537-dji-0847-pano.jpg?t=f2660d
return src.replace(/(\/storage\/+cache\/+.*?)\.thumb[0-9]+\.webp/, "$1.jpg");
}
if (domain === "app.fanfix.io") {
// thanks to remlap for reporting:
// https://app.fanfix.io/static/images/circular_window_white.png
if (/\/static\/+images\/+circular_window_white\./.test(src)) {
return {
url: src,
bad: "mask"
};
}
}
if (domain === "cms.rsa-media.de") {
// thanks to anonymous for reporting:
// https://cms.rsa-media.de/uploads/large_09_rsamgmt_Patrick_fcec455cc6.jpeg
// https://cms.rsa-media.de/uploads/09_rsamgmt_Patrick_fcec455cc6.jpeg -- 3100x2067
return src.replace(/(\/uploads\/+)(?:small|medium|large)_([^/]+)(?:[?#].*)?$/, "$1$2");
}
if (domain_nosub === "lemmecheck.com" && /^cdn[0-9]*\./.test(domain)) {
// thanks to anonymous for reporting:
// https://cdn2.lemmecheck.com/lmccom/uploads/2023/05/princess-alice-in-presenting-princess-alice-by-mytro-for-metart-5-300x450.jpg
// https://cdn2.lemmecheck.com/lmccom/uploads/2023/05/princess-alice-in-presenting-princess-alice-by-mytro-for-metart-5.jpg
return {
url: src.replace(/-[0-9]+x[0-9]+(\.[^/.]+)(?:[?#].*)?$/, "$1"),
headers: {
Referer: "https://www.lemmecheck.com/"
}
};
}
if (domain_nowww === "irrgangfinearts.de") {
// thanks to anonymous for reporting:
// https://www.irrgangfinearts.de/media/image/product/21044/lg/l202200335.webp
// https://www.irrgangfinearts.de/media/image/product/21044/xl/l202200335.webp
// https://www.irrgangfinearts.de/media/image/product/21044/xl/l202200335.png
return src
.replace(/(\/xl\/+l[0-9]+\.)(?:webp|jpg)(?:[?#].*)?$/, "$1png")
.replace(/(\/media\/+image\/+product\/+[0-9]+\/+)(?:sm|md|lg)\/+/, "$1xl/");
}
if (domain === "photos.psychologytoday.com") {
// thanks to anonymous for reporting:
// https://photos.psychologytoday.com/3b72b3f7-46cd-11ea-a6ad-06142c356176/6/320x400.jpeg
// https://photos.psychologytoday.com/3b72b3f7-46cd-11ea-a6ad-06142c356176/6/original.jpeg
return src.replace(/(\/[-0-9a-f]{10,}\/+[0-9a-f]+\/+)[0-9]+x[0-9]+\./, "$1original.");
}
if (domain === "imagenes.cronica.com.mx" ||
// https://imghandler.cronica.com.mx/files/image_948_465/files/fp/uploads/2024/05/04/6636c21b5dafb.jpeg
// https://imagenes.cronica.com.mx/uploads/2024/05/04/6636c21b5dafb.jpeg
domain === "imghandler.cronica.com.mx") {
// thanks to sn3akyb3ar on github: https://github.com/qsniyg/maxurl/issues/1321
// https://imagenes.cronica.com.mx/files/image_948_465/files/fp/uploads/2024/05/04/6636c21b5dafb.r_d.974-506-4938.jpeg
// https://imagenes.cronica.com.mx/files/image_948_465/files/fp/uploads/2024/05/04/6636c21b5dafb.jpeg
// https://imagenes.cronica.com.mx/uploads/2024/05/04/6636c21b5dafb.jpeg
// https://imagenes.cronica.com.mx/files/content_image_desktop_filter/uploads/2024/05/04/6636c5b6a654c.jpeg
// https://imagenes.cronica.com.mx/uploads/2024/05/04/6636c5b6a654c.jpeg
return src
.replace(/:\/\/[^/]+\/+.*?\/(uploads\/+[0-9]{4}\/+(?:[0-9]{2}\/+){2}[0-9a-f]{5,}\.[a-z]+)(?:[?#].*)?/, "://imagenes.cronica.com.mx/$1")
.replace(/(\/uploads\/+[0-9]{4}\/+(?:[0-9]{2}\/+){2}[0-9a-f]{5,}\.)[^/?#]+\.([a-z]+)(?:[?#].*)?$/, "$1$2");
}
// -- 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 030f609

Please sign in to comment.