From 1d0c7329c6b9bc624da5c2a036d8c3b724aabe4d Mon Sep 17 00:00:00 2001 From: qsniyg Date: Thu, 30 May 2024 17:56:34 +0000 Subject: [PATCH] More websites/rules --- CHANGELOG.txt | 2 +- src/userscript.ts | 167 ++++++++++++++++++++++++++++++++++++++++++--- userscript.user.js | 153 +++++++++++++++++++++++++++++++++++++++-- 3 files changed, 306 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d629c37d..6faddbc4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -9,7 +9,7 @@ Bugfixes: * Fix browser download replacing current page on non-same-origin URLs * Fix GM_download headers for Tampermonkey and Violentmonkey -Special thanks to fireattack, nimbuz, Froktime, fyhtma, SakalliTavernaci, TheLastZombie, oifj34f34f, Solus, sn3akyb3ar, n0stal6ic, nyahgust, vscum, TristanWasTaken, BlindWanda, SUPER7X, n0099, remlap, CetaceanNation, bsydow, tathastu871 for their contributions and reports for this release +Special thanks to fireattack, nimbuz, Froktime, fyhtma, SakalliTavernaci, TheLastZombie, oifj34f34f, Solus, sn3akyb3ar, n0stal6ic, nyahgust, vscum, TristanWasTaken, BlindWanda, SUPER7X, n0099, remlap, CetaceanNation, bsydow, tathastu871, roi for their contributions and reports for this release --- diff --git a/src/userscript.ts b/src/userscript.ts index 98c50987..3e852b3e 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -29058,6 +29058,10 @@ var $$IMU_EXPORT$$; // https://brand.assets.adidas.com/image/upload/f_auto,fl_lossy,q_1/enUS/Images/xcat-fw20-rfc-DerrickRose-statement-02-d_tcm221-581175.jpg // https://brand.assets.adidas.com/image/upload/enUS/Images/xcat-fw20-rfc-DerrickRose-statement-02-d_tcm221-581175.jpg domain === "brand.assets.adidas.com" || + // thanks to roi: + // https://images.tennis.com/image/private/t_16-9_768/f_auto/tenniscom-prd/in1ds81hd2ufj4gomffx.jpg + // https://images.tennis.com/image/private/f_png/tenniscom-prd/in1ds81hd2ufj4gomffx.jpg + domain === "images.tennis.com" || // thanks to karpuzikov on github: https://github.com/qsniyg/maxurl/issues/1066 // https://resource.logitechg.com/w_677,ar_1:1,c_limit,b_rgb:2f3132,q_auto,f_auto,dpr_auto/d_transparent.gif/content/dam/gaming/en/homepage/product-swatch-carousel/home-product-swatch-4.png?v=1 // https://resource.logitechg.com/content/dam/gaming/en/homepage/product-swatch-carousel/home-product-swatch-4.png?v=1 @@ -29784,6 +29788,10 @@ var $$IMU_EXPORT$$; // https://cdn-live.foreignaffairs.com/sites/default/files/styles/_webp_large_2x/public/images/2023/09/05/RTSNCEK8.JPG.webp?itok=yfCfahRC // https://cdn-live.foreignaffairs.com/sites/default/files/images/2023/09/05/RTSNCEK8.JPG domain === "cdn-live.foreignaffairs.com" || + // thanks to roi: + // https://negrusty.pro/sites/default/files/styles/post_content_1200xany/public/text-images/2024-04/20141101_gaf_rg15_011_1712662477_1712662561.webp?itok=uva8AgrE + // https://negrusty.pro/sites/default/files/text-images/2024-04/20141101_gaf_rg15_011_1712662477_1712662561.jpg + domain_nowww === "negrusty.pro" || // http://cdn.whodoyouthinkyouaremagazine.com/sites/default/files/imagecache/623px_wide/episode/hewer500.jpg // http://cdn.whodoyouthinkyouaremagazine.com/sites/default/files/episode/hewer500.jpg // https://www.telugucinema.com/sites/default/files2/styles/media_gallery_thumbnail/public/amy-jackson-instagram1.jpg?itok=nwFhV2Iy @@ -33045,6 +33053,9 @@ var $$IMU_EXPORT$$; // https://www.otempo.com.br/adobe/dynamicmedia/deliver/dm-aid--33a460a9-9598-46e3-863d-b5afc96c0f78/cidades-pris-o-em-bh-1716939511.jpg?preferwebp=true&width=200&quality=90 // https://www.otempo.com.br/adobe/dynamicmedia/deliver/dm-aid--33a460a9-9598-46e3-863d-b5afc96c0f78/cidades-pris-o-em-bh-1716939511.jpg (domain_nowww === "otempo.com.br" && /\/dynamicmedia\/+deliver\//.test(src)) || + // thanks to roi: + // https://www.usnews.com/object/image/0000018d-cd8c-d59b-ad8d-eddecde50001/feb21-ukraine-01.jpg?update-time=1708550742040&size=responsiveGallery + (domain_nowww === "usnews.com" && /\/object\/+image\//.test(src)) || // http://us.jimmychoo.com/dw/image/v2/AAWE_PRD/on/demandware.static/-/Sites-jch-master-product-catalog/default/dw70b1ebd2/images/rollover/LIZ100MPY_120004_MODEL.jpg?sw=245&sh=245&sm=fit // https://www.aritzia.com/on/demandware.static/-/Library-Sites-Aritzia_Shared/default/dw3a7fef87/seasonal/ss18/ss18-springsummercampaign/ss18-springsummercampaign-homepage/hptiles/tile-wilfred-lrg.jpg src.match(/\/demandware\.static\//) || @@ -61763,6 +61774,17 @@ var $$IMU_EXPORT$$; //return src.replace(/\/[wh][0-9]+\/([^/]+_[0-9]+\.[^/.]*)$/, "/full/$1"); } + if (domain === "images.tagesschau.de") { + // thanks to roi: + // https://images.tagesschau.de/image/80b637db-a460-4ec5-8d05-55dc6003e30e/AAABh0bJIz8/AAABibBxvls/16x9-768/panzerhaubitze-ukraine-107.webp + // https://images.tagesschau.de/image/80b637db-a460-4ec5-8d05-55dc6003e30e/AAABh0bJIz8/AAABibBxvls/original/panzerhaubitze-ukraine-107.webp + // https://images.tagesschau.de/image/c6184b7d-2207-4ab7-a5ec-bcce66bbdf05/AAABiiVR52g/AAABibBx2rU/20x9-1280/cyberbunker-146.webp + // https://images.tagesschau.de/image/c6184b7d-2207-4ab7-a5ec-bcce66bbdf05/AAABiiVR52g/AAABibBx2rU/original/cyberbunker-146.webp + // https://images.tagesschau.de/image/130defc7-11bb-4a6d-8458-76dcb21e46bb/AAABh7f9s74/AAABjwnlREM/1x1-256/eu-staaten-flaggen-104.webp + // https://images.tagesschau.de/image/130defc7-11bb-4a6d-8458-76dcb21e46bb/AAABh7f9s74/AAABjwnlREM/original/eu-staaten-flaggen-104.webp + return src.replace(/(\/image\/+[-0-9a-f]{10,}\/+[^/]+\/+[^/]+\/+)[^/]+\/+([^/]+)(?:[?#].*)?$/, "$1original/$2"); + } + if (domain === "www1.wdr.de" || // https://kinder.wdr.de/radio/kinderradionacht/fotos/krn-teaserbild100~_v-TeaserAufmacher.jpg -- 512x288 // https://kinder.wdr.de/radio/kinderradionacht/fotos/krn-teaserbild100.jpg -- 310x174 @@ -76863,7 +76885,10 @@ var $$IMU_EXPORT$$; "/assets/external/galleries/$1"); } - if (domain === "mix.tn.kz") { + if (domain === "mix.tn.kz" || + // https://tengrinews.kz/userdata/news/2014/news_266860/thumb_b/photo_144147.jpg -- upscaled? + // https://tengrinews.kz/userdata/news/2014/news_266860/photo_144147.jpg -- more upscaled? + domain === "tengrinews.kz") { // https://mix.tn.kz/userdata/news/2017/news_330445/thumb_b/photo_231398.jpg // https://mix.tn.kz/userdata/news/2017/news_330445/photo_231398.jpg return src.replace(/\/thumb_[a-z]+\/+(photo_[0-9]+\.[^/.]*)(?:[?#].*)?$/, @@ -78723,6 +78748,22 @@ var $$IMU_EXPORT$$; return src.replace(/(:\/\/[^/]+\/+)[^/]+\/+([^/]+\/+images\/)/, "$1q100/$2"); } + if (domain === "storage.yandexcloud.net") { + // thanks to roi: + // https://storage.yandexcloud.net/imagesspletnikru/2024/01/23/YC6K/fit=cover,width=744,height=496.webp + // https://storage.yandexcloud.net/imagesspletnikru/2024/01/23/YC6K/original.webp + newsrc = src.replace(/(\/imagesspletnikru\/+[0-9]{4}\/+[0-9]{2}\/+[0-9]{2}\/+[^/]+\/+)[^/]+(\.[a-z]+)(?:[?#].*)?$/, "$1original$2"); + if (newsrc !== src) + return newsrc; + + // thanks to roi: + // https://storage.yandexcloud.net/imagesspletnikru/2024/01/23/YC6K/original.webp + // https://storage.yandexcloud.net/imagesspletnikru/2024/01/23/YC6K/original.jpeg + newsrc = src.replace(/(\/imagesspletnikru\/+[0-9]{4}\/+[0-9]{2}\/+[0-9]{2}\/+[^/]+\/+)original\.webp(?:[?#].*)?$/, "$1original.jpeg"); + if (newsrc !== src) + return newsrc; + } + if (domain_nowww === "cara.app") { let get_cara_imageid = function(url) { return url.replace(/.*\/posts\/+[-0-9a-f]{20,}\/[^-/.?#]+-([^-/.?#]+)-[^/]+(?:[?#].*)?$/, "$1"); @@ -81557,6 +81598,14 @@ var $$IMU_EXPORT$$; newsrc = src.replace(/^[a-z]+:\/\/[^/]*\/__origami\/+service\/+image\/+v2\/+images\/+[^/]*\/+(https?.*?)(?:[?#].*)?$/, "$1"); if (newsrc !== src) return decodeuri_ifneeded(newsrc); + + // thanks to roi: + // https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3A78bebe8e-2504-40ea-b544-7e120484d39d?source=next-article&fit=scale-down&quality=highest&width=700&dpr=1 + // https://d1e00ek4ebabms.cloudfront.net/production/78bebe8e-2504-40ea-b544-7e120484d39d.jpg + match = src.match(/\/ftcms(?::|%3A)([-0-9a-f]{10,})/); + if (match) { + return "https://d1e00ek4ebabms.cloudfront.net/production/" + match[1] + ".jpg"; + } } if (domain === "cdnimg.rg.ru") { @@ -109339,17 +109388,63 @@ var $$IMU_EXPORT$$; let subdomain = domain.replace(/\.cdn\.arcpublishing\.com$/, ""); let folder = subdomain.replace(/^([a-z]+)-.*/, "$1"); - newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+resizer\/+v2\/+([^?#/]+)(?:[?#].*)?$/, "https://cloudfront-us-east-1.images.arcpublishing.com/" + folder + "/$1"); + let loc = "us-east-1"; + if (folder === "thenational") + // thanks to roi: + // https://thenational-the-national-prod.cdn.arcpublishing.com/resizer/v2/M4J7Z42T6RFJHIOK6C7ST2AOYQ.jpg?smart=true&auth=f1af8e4b5ce5cc75585098baad7a855d471b304c2c47c9df522dd53529d57f0c&width=600&height=337 + // https://cloudfront-eu-central-1.images.arcpublishing.com/thenational/M4J7Z42T6RFJHIOK6C7ST2AOYQ.jpg + loc = "eu-central-1"; + + newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+resizer\/+v2\/+([^?#/]+)(?:[?#].*)?$/, "https://cloudfront-" + loc + ".images.arcpublishing.com/" + folder + "/$1"); if (newsrc !== src) return newsrc; } - if (domain_nowww === "nzherald.co.nz") { + if (domain_nosub === "arcpublishing.com" && /^cloudfront-[^/]+\.images\./.test(domain)) { + // thanks to roi: + // https://cloudfront-us-east-2.images.arcpublishing.com/reuters/https%3A%2F%2Fcloudfront-us-east-2.images.arcpublishing.com%2Freuters%2FCYOLQ4HWSBALBLGSUYZVVJOMR4.JPG + // https://cloudfront-us-east-2.images.arcpublishing.com/reuters/CYOLQ4HWSBALBLGSUYZVVJOMR4.JPG + newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+[^/]+\/+(https?(?::|%3A).*)$/, "$1"); + if (newsrc !== src) + return decodeuri_ifneeded(newsrc); + } + + if (domain_nowww === "nzherald.co.nz" || + // thanks to roi: + // https://www.reuters.com/resizer/v2/CEEOQZWGZRK3NBZAWIEUB2WMPU.jpg?auth=3dd3003638276b10fe50b1fae382cb9ffe6db7eae25bf58e6e5920b9fca5eead&width=960&quality=80 + // https://cloudfront-us-east-2.images.arcpublishing.com/reuters/CEEOQZWGZRK3NBZAWIEUB2WMPU.jpg + // https://www.reuters.com/resizer/v2/https%3A%2F%2Fcloudfront-us-east-2.images.arcpublishing.com%2Freuters%2FCYOLQ4HWSBALBLGSUYZVVJOMR4.JPG?auth=13b9a416c2001d7684d4a72c0c9ebc72c75541cebce462625cc8bd03261fc48d&width=1200&quality=80 + // https://cloudfront-us-east-2.images.arcpublishing.com/reuters/CYOLQ4HWSBALBLGSUYZVVJOMR4.JPG + domain_nowww === "reuters.com" || + // thanks to roi: + // https://www.masslive.com/resizer/v2/BLNXJJL3RJBOTJMHUZVO3F2GHE.jpg?auth=7360c30742429c3c7eaa24a1b24e5355b9951c80b41e582d0a0d4abd0d60afb8&width=1280&quality=90 + // https://cloudfront-us-east-1.images.arcpublishing.com/advancelocal/BLNXJJL3RJBOTJMHUZVO3F2GHE.jpg + domain_nowww === "masslive.com" || + // thanks to roi: + // https://imagenes.elpais.com/resizer/v2/Q65QV6AOQFD67GSRGNODWVDEEQ.jpg?auth=a24d3386f30004dcad48575ed42b4cf3b3cb913397bb4e1485760a34b967b66c&width=828&height=466&smart=true + // https://cloudfront-eu-central-1.images.arcpublishing.com/prisa/Q65QV6AOQFD67GSRGNODWVDEEQ.jpg + domain === "imagenes.elpais.com" || + // thanks to roi: + // https://www.theglobeandmail.com/resizer/v2/MIMBGW3UORBLZMMTL2GASZ75JE.JPG?auth=c570680e25c89027c795085ce398d06291485e026f2830e996db3e2d9a71d3d8&width=900&quality=80 + // https://cloudfront-us-east-1.images.arcpublishing.com/tgam/MIMBGW3UORBLZMMTL2GASZ75JE.JPG + domain_nowww === "theglobeandmail.com") { // thanks to anonymous for reporting: // https://www.nzherald.co.nz/resizer/v2/65XCPLTDZMDJ4ETPGQSD7N5WNY.jpg?auth=845c2b3d0286c0d98e103c70b57a9fd65117bbe22938fd846df62440949479b0&width=1440&height=1795&quality=70&smart=true // https://cloudfront-ap-southeast-2.images.arcpublishing.com/nzme/65XCPLTDZMDJ4ETPGQSD7N5WNY.jpg - let folder = "nzme"; - newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+resizer\/+v2\/+([^?#/]+)(?:[?#].*)?$/, "https://cloudfront-ap-southeast-2.images.arcpublishing.com/" + folder + "/$1"); + let info = {folder: "", loc: ""}; + + if (domain_nowww === "nzherald.co.nz") + info = {folder: "nzme", loc: "ap-southeast-2"}; + else if (domain_nowww === "reuters.com") + info = {folder: "reuters", loc: "us-east-2"}; + else if (domain_nowww === "masslive.com") + info = {folder: "advancelocal", loc: "us-east-1"}; + else if (domain_nowww === "theglobeandmail.com") + info = {folder: "tgam", loc: "us-east-1"}; + else if (domain === "imagenes.elpais.com") + info = {folder: "prisa", loc: "eu-central-1"}; + + newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+resizer\/+v2\/+([^?#/]+)(?:[?#].*)?$/, "https://cloudfront-" + info.loc + ".images.arcpublishing.com/" + info.folder + "/$1"); if (newsrc !== src) return newsrc; } @@ -112012,13 +112107,26 @@ var $$IMU_EXPORT$$; return src.replace(/(\/auction\/+)(?:small|view)(\/+auctions\/+)/, "$1big$2"); } - if (domain === "media.springernature.com") { + if (domain === "media.springernature.com" || + // thanks to roi: + // https://media.nature.com/lw767/magazine-assets/d41586-024-01223-0/d41586-024-01223-0_27010832.jpg?as=webp + // https://media.nature.com/full/magazine-assets/d41586-024-01223-0/d41586-024-01223-0_27010832.jpg + // https://media.nature.com/w140h79/springer-static/image/art%3A10.1038%2Fs41586-024-07339-7/MediaObjects/41586_2024_7339_Fig1_HTML.png + // https://media.nature.com/full/springer-static/image/art%3A10.1038%2Fs41586-024-07339-7/MediaObjects/41586_2024_7339_Fig1_HTML.png + domain === "media.nature.com" || + // thanks to roi: + // https://images.nature.com/w140h79/magazine-assets/d41586-024-01167-5/d41586-024-01167-5_27002754.jpg + // https://images.nature.com/full/magazine-assets/d41586-024-01167-5/d41586-024-01167-5_27002754.jpg + domain === "images.nature.com") { // thanks to anonymous for reporting: // https://media.springernature.com/w300/springer-static/image/art%3A10.1038%2Fs41565-019-0561-4/MediaObjects/41565_2019_561_Figa_HTML.jpg?as=webp // https://media.springernature.com/full/springer-static/image/art%3A10.1038%2Fs41565-019-0561-4/MediaObjects/41565_2019_561_Figa_HTML.jpg - return src.replace(/(:\/\/[^/]+\/+)[wh][0-9]+\/+(.*?)(?:[?#].*)?$/, "$1full/$2"); + // thanks to roi: + // https://media.springernature.com/lw685/springer-static/image/art%3A10.1038%2Fs41467-024-46846-z/MediaObjects/41467_2024_46846_Fig1_HTML.png?as=webp + // https://media.springernature.com/full/springer-static/image/art%3A10.1038%2Fs41467-024-46846-z/MediaObjects/41467_2024_46846_Fig1_HTML.png + //return src.replace(/(:\/\/[^/]+\/+)[wh][0-9]+\/+(.*?)(?:[?#].*)?$/, "$1full/$2"); + return remove_queries(src.replace(/(:\/\/[^/]+\/+)(?:l?w[0-9]+|w[0-9]+h[0-9]+)\//, "$1full/"), ["as"]); } - if (domain_nowww === "openverse.org") { newsrc = website_query({ website_regex: /^[a-z]+:\/\/[^/]+\/+image\/+([-0-9a-f]{20,})(?:[?#].*)?$/, @@ -114565,6 +114673,49 @@ var $$IMU_EXPORT$$; } } + if (domain_nowww === "swissiceskating.ch") { + // thanks to roi: + // https://www.swissiceskating.ch/_default_upload_bucket/image-thumb__4794__uebersichtListe/speed-quebec.jpg + // https://www.swissiceskating.ch/_default_upload_bucket/speed-quebec.jpeg + newsrc = src.replace(/(\/_default_upload_bucket\/+)image-thumb__[^/]+\/+/, "$1"); + if (newsrc !== src) + return add_extensions_jpeg(newsrc); + + // thanks to roi: + // https://www.swissiceskating.ch/_default_upload_bucket/schweizer-frauen-team-pursuit4_16-9.jpeg + // https://www.swissiceskating.ch/_default_upload_bucket/schweizer-frauen-team-pursuit4.jpeg + return src.replace(/(\/_default_upload_bucket\/+[^/]+)_16-9(\.[a-z]+)(?:[?#].*)?$/, "$1$2") + } + + if (domain === "mim.p7s1.io") { + // thanks to roi: + // https://mim.p7s1.io/pis/mw/1a4ajq5FgV8h73OMk30hSmQ3ksnTujGLThfZrJTemL4yREOdH4xmFMinlxemkCY1nZ8eOvuOHXqT69lkeQx2EfPTgCBdofDvzF6jm54Oi70UOg/profile:ezone-teaser940x528 + // https://mim.p7s1.io/pis/mw/1a4ajq5FgV8h73OMk30hSmQ3ksnTujGLThfZrJTemL4yREOdH4xmFMinlxemkCY1nZ8eOvuOHXqT69lkeQx2EfPTgCBdofDvzF6jm54Oi70UOg/profile:original + // https://mim.p7s1.io/pis/ld/e9e8zChLCVyZ-c1vEwXZAanB-DJ78rnq2V2gRWTHzVV6NywNWMSJCEGmZ4YSENP-WRL0b9lo2z_IfR63zTDrzZgVPU1C_Bs-q1UyOtErtP7vQ66yLAURn7F9Qzy_2jxg4stqAOah-GU/profile:original?w=1200&rect=643%2C0%2C3859%2C2894 + // https://mim.p7s1.io/pis/ld/e9e8zChLCVyZ-c1vEwXZAanB-DJ78rnq2V2gRWTHzVV6NywNWMSJCEGmZ4YSENP-WRL0b9lo2z_IfR63zTDrzZgVPU1C_Bs-q1UyOtErtP7vQ66yLAURn7F9Qzy_2jxg4stqAOah-GU/profile:original + return src.replace(/(\/pis\/+[^/]+\/+[^/]+\/+)profile[^/?#]+(?:[?#].*)?$/, "$1profile:original"); + } + + if (domain === "storage.fest2024.com") { + // thanks to roi: + // https://storage.fest2024.com/image/photo/images/F92D6E449EE1487C9F0F01D4C8D37B2D/410x280/f=webp + // https://storage.fest2024.com/image/photo/images/F92D6E449EE1487C9F0F01D4C8D37B2D + // https://storage.fest2024.com/image/photo/images/F92D6E449EE1487C9F0F01D4C8D37B2D/410x280/m=crop + // https://storage.fest2024.com/image/photo/images/F92D6E449EE1487C9F0F01D4C8D37B2D + return { + url: src.replace(/(\/image\/+photo\/+images\/+[0-9A-F]{10,})\/.*/, "$1"), + head_wrong_contenttype: true + }; + } + + if (domain_nowww === "super.ru") { + // https://super.ru/image/rs::3840:::/quality:5/plain/s3://super-static/prod/62a05d755c72ff4871ebd2ff-1900x.jpeg + // https://super.ru/image/rs:::::/quality:100/plain/s3://super-static/prod/62a05d755c72ff4871ebd2ff-1900x.jpeg + // other: + // https://api.eric.s3storage.ru/super-static/prod/61d88522853cde454af96efa-150x.webp + return src.replace(/\/image\/+.*?s3:\/\//, "/image/rs:::::/quality:100/plain/s3://"); + } + diff --git a/userscript.user.js b/userscript.user.js index 4808bc1c..75247cd2 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -26515,6 +26515,10 @@ var $$IMU_EXPORT$$; // https://brand.assets.adidas.com/image/upload/f_auto,fl_lossy,q_1/enUS/Images/xcat-fw20-rfc-DerrickRose-statement-02-d_tcm221-581175.jpg // https://brand.assets.adidas.com/image/upload/enUS/Images/xcat-fw20-rfc-DerrickRose-statement-02-d_tcm221-581175.jpg domain === "brand.assets.adidas.com" || + // thanks to roi: + // https://images.tennis.com/image/private/t_16-9_768/f_auto/tenniscom-prd/in1ds81hd2ufj4gomffx.jpg + // https://images.tennis.com/image/private/f_png/tenniscom-prd/in1ds81hd2ufj4gomffx.jpg + domain === "images.tennis.com" || // thanks to karpuzikov on github: https://github.com/qsniyg/maxurl/issues/1066 // https://resource.logitechg.com/w_677,ar_1:1,c_limit,b_rgb:2f3132,q_auto,f_auto,dpr_auto/d_transparent.gif/content/dam/gaming/en/homepage/product-swatch-carousel/home-product-swatch-4.png?v=1 // https://resource.logitechg.com/content/dam/gaming/en/homepage/product-swatch-carousel/home-product-swatch-4.png?v=1 @@ -27173,6 +27177,10 @@ var $$IMU_EXPORT$$; // https://cdn-live.foreignaffairs.com/sites/default/files/styles/_webp_large_2x/public/images/2023/09/05/RTSNCEK8.JPG.webp?itok=yfCfahRC // https://cdn-live.foreignaffairs.com/sites/default/files/images/2023/09/05/RTSNCEK8.JPG domain === "cdn-live.foreignaffairs.com" || + // thanks to roi: + // https://negrusty.pro/sites/default/files/styles/post_content_1200xany/public/text-images/2024-04/20141101_gaf_rg15_011_1712662477_1712662561.webp?itok=uva8AgrE + // https://negrusty.pro/sites/default/files/text-images/2024-04/20141101_gaf_rg15_011_1712662477_1712662561.jpg + domain_nowww === "negrusty.pro" || // http://cdn.whodoyouthinkyouaremagazine.com/sites/default/files/imagecache/623px_wide/episode/hewer500.jpg // http://cdn.whodoyouthinkyouaremagazine.com/sites/default/files/episode/hewer500.jpg // https://www.telugucinema.com/sites/default/files2/styles/media_gallery_thumbnail/public/amy-jackson-instagram1.jpg?itok=nwFhV2Iy @@ -30201,6 +30209,9 @@ var $$IMU_EXPORT$$; // https://www.otempo.com.br/adobe/dynamicmedia/deliver/dm-aid--33a460a9-9598-46e3-863d-b5afc96c0f78/cidades-pris-o-em-bh-1716939511.jpg?preferwebp=true&width=200&quality=90 // https://www.otempo.com.br/adobe/dynamicmedia/deliver/dm-aid--33a460a9-9598-46e3-863d-b5afc96c0f78/cidades-pris-o-em-bh-1716939511.jpg (domain_nowww === "otempo.com.br" && /\/dynamicmedia\/+deliver\//.test(src)) || + // thanks to roi: + // https://www.usnews.com/object/image/0000018d-cd8c-d59b-ad8d-eddecde50001/feb21-ukraine-01.jpg?update-time=1708550742040&size=responsiveGallery + (domain_nowww === "usnews.com" && /\/object\/+image\//.test(src)) || // http://us.jimmychoo.com/dw/image/v2/AAWE_PRD/on/demandware.static/-/Sites-jch-master-product-catalog/default/dw70b1ebd2/images/rollover/LIZ100MPY_120004_MODEL.jpg?sw=245&sh=245&sm=fit // https://www.aritzia.com/on/demandware.static/-/Library-Sites-Aritzia_Shared/default/dw3a7fef87/seasonal/ss18/ss18-springsummercampaign/ss18-springsummercampaign-homepage/hptiles/tile-wilfred-lrg.jpg src.match(/\/demandware\.static\//) || @@ -56088,6 +56099,16 @@ var $$IMU_EXPORT$$; return src.replace(/(\/image\/+[0-9]{6}\/)+w[0-9]+(?:h[0-9]+)?\/+/, "$1full/"); //return src.replace(/\/[wh][0-9]+\/([^/]+_[0-9]+\.[^/.]*)$/, "/full/$1"); } + if (domain === "images.tagesschau.de") { + // thanks to roi: + // https://images.tagesschau.de/image/80b637db-a460-4ec5-8d05-55dc6003e30e/AAABh0bJIz8/AAABibBxvls/16x9-768/panzerhaubitze-ukraine-107.webp + // https://images.tagesschau.de/image/80b637db-a460-4ec5-8d05-55dc6003e30e/AAABh0bJIz8/AAABibBxvls/original/panzerhaubitze-ukraine-107.webp + // https://images.tagesschau.de/image/c6184b7d-2207-4ab7-a5ec-bcce66bbdf05/AAABiiVR52g/AAABibBx2rU/20x9-1280/cyberbunker-146.webp + // https://images.tagesschau.de/image/c6184b7d-2207-4ab7-a5ec-bcce66bbdf05/AAABiiVR52g/AAABibBx2rU/original/cyberbunker-146.webp + // https://images.tagesschau.de/image/130defc7-11bb-4a6d-8458-76dcb21e46bb/AAABh7f9s74/AAABjwnlREM/1x1-256/eu-staaten-flaggen-104.webp + // https://images.tagesschau.de/image/130defc7-11bb-4a6d-8458-76dcb21e46bb/AAABh7f9s74/AAABjwnlREM/original/eu-staaten-flaggen-104.webp + return src.replace(/(\/image\/+[-0-9a-f]{10,}\/+[^/]+\/+[^/]+\/+)[^/]+\/+([^/]+)(?:[?#].*)?$/, "$1original/$2"); + } if (domain === "www1.wdr.de" || // https://kinder.wdr.de/radio/kinderradionacht/fotos/krn-teaserbild100~_v-TeaserAufmacher.jpg -- 512x288 // https://kinder.wdr.de/radio/kinderradionacht/fotos/krn-teaserbild100.jpg -- 310x174 @@ -69477,7 +69498,10 @@ var $$IMU_EXPORT$$; .replace(/(\/assets\/.*\/)[a-z]+\.([0-9A-Z]+)\.[0-9]+(\.[^/.]*)(?:[?#].*)?$/, "$1$2$3") .replace(/\/z\/.*?\/([0-9]{4}\/+[0-9]{2}\/+[0-9]{2}\/+[0-9a-f]+\/+[0-9a-fA-Z]+\.[^/.]*)(?:\/+[0-9]+)?(?:[?#].*)?$/, "/assets/external/galleries/$1"); } - if (domain === "mix.tn.kz") { + if (domain === "mix.tn.kz" || + // https://tengrinews.kz/userdata/news/2014/news_266860/thumb_b/photo_144147.jpg -- upscaled? + // https://tengrinews.kz/userdata/news/2014/news_266860/photo_144147.jpg -- more upscaled? + domain === "tengrinews.kz") { // https://mix.tn.kz/userdata/news/2017/news_330445/thumb_b/photo_231398.jpg // https://mix.tn.kz/userdata/news/2017/news_330445/photo_231398.jpg return src.replace(/\/thumb_[a-z]+\/+(photo_[0-9]+\.[^/.]*)(?:[?#].*)?$/, "/$1"); @@ -71102,6 +71126,20 @@ var $$IMU_EXPORT$$; // https://d3ls91xgksobn.cloudfront.net/q100/etuovimedia/images/property/import/749/1938749/0e76b9541118d347871c0e0e51d244c4/e514bc941bdc717fe6796d9f56502c32/ORIGINAL.jpeg return src.replace(/(:\/\/[^/]+\/+)[^/]+\/+([^/]+\/+images\/)/, "$1q100/$2"); } + if (domain === "storage.yandexcloud.net") { + // thanks to roi: + // https://storage.yandexcloud.net/imagesspletnikru/2024/01/23/YC6K/fit=cover,width=744,height=496.webp + // https://storage.yandexcloud.net/imagesspletnikru/2024/01/23/YC6K/original.webp + newsrc = src.replace(/(\/imagesspletnikru\/+[0-9]{4}\/+[0-9]{2}\/+[0-9]{2}\/+[^/]+\/+)[^/]+(\.[a-z]+)(?:[?#].*)?$/, "$1original$2"); + if (newsrc !== src) + return newsrc; + // thanks to roi: + // https://storage.yandexcloud.net/imagesspletnikru/2024/01/23/YC6K/original.webp + // https://storage.yandexcloud.net/imagesspletnikru/2024/01/23/YC6K/original.jpeg + newsrc = src.replace(/(\/imagesspletnikru\/+[0-9]{4}\/+[0-9]{2}\/+[0-9]{2}\/+[^/]+\/+)original\.webp(?:[?#].*)?$/, "$1original.jpeg"); + if (newsrc !== src) + return newsrc; + } if (domain_nowww === "cara.app") { var get_cara_imageid_1 = function(url) { return url.replace(/.*\/posts\/+[-0-9a-f]{20,}\/[^-/.?#]+-([^-/.?#]+)-[^/]+(?:[?#].*)?$/, "$1"); @@ -73575,6 +73613,13 @@ var $$IMU_EXPORT$$; newsrc = src.replace(/^[a-z]+:\/\/[^/]*\/__origami\/+service\/+image\/+v2\/+images\/+[^/]*\/+(https?.*?)(?:[?#].*)?$/, "$1"); if (newsrc !== src) return decodeuri_ifneeded(newsrc); + // thanks to roi: + // https://www.ft.com/__origami/service/image/v2/images/raw/ftcms%3A78bebe8e-2504-40ea-b544-7e120484d39d?source=next-article&fit=scale-down&quality=highest&width=700&dpr=1 + // https://d1e00ek4ebabms.cloudfront.net/production/78bebe8e-2504-40ea-b544-7e120484d39d.jpg + match = src.match(/\/ftcms(?::|%3A)([-0-9a-f]{10,})/); + if (match) { + return "https://d1e00ek4ebabms.cloudfront.net/production/" + match[1] + ".jpg"; + } } if (domain === "cdnimg.rg.ru") { // https://cdnimg.rg.ru/img/content/166/03/74/2019-03-02T052221Z_450178624_RC1C0EAD7E20_RTRMADP_3_VIETNAM-NORTHKOREA_t_200x134.jpg @@ -98202,16 +98247,58 @@ var $$IMU_EXPORT$$; // https://cloudfront-us-east-1.images.arcpublishing.com/gray/VYOQYEV74VDZTG6NUKF6YBRZGU.jpg var subdomain = domain.replace(/\.cdn\.arcpublishing\.com$/, ""); var folder_1 = subdomain.replace(/^([a-z]+)-.*/, "$1"); - newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+resizer\/+v2\/+([^?#/]+)(?:[?#].*)?$/, "https://cloudfront-us-east-1.images.arcpublishing.com/" + folder_1 + "/$1"); + var loc = "us-east-1"; + if (folder_1 === "thenational") + // thanks to roi: + // https://thenational-the-national-prod.cdn.arcpublishing.com/resizer/v2/M4J7Z42T6RFJHIOK6C7ST2AOYQ.jpg?smart=true&auth=f1af8e4b5ce5cc75585098baad7a855d471b304c2c47c9df522dd53529d57f0c&width=600&height=337 + // https://cloudfront-eu-central-1.images.arcpublishing.com/thenational/M4J7Z42T6RFJHIOK6C7ST2AOYQ.jpg + loc = "eu-central-1"; + newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+resizer\/+v2\/+([^?#/]+)(?:[?#].*)?$/, "https://cloudfront-" + loc + ".images.arcpublishing.com/" + folder_1 + "/$1"); if (newsrc !== src) return newsrc; } - if (domain_nowww === "nzherald.co.nz") { + if (domain_nosub === "arcpublishing.com" && /^cloudfront-[^/]+\.images\./.test(domain)) { + // thanks to roi: + // https://cloudfront-us-east-2.images.arcpublishing.com/reuters/https%3A%2F%2Fcloudfront-us-east-2.images.arcpublishing.com%2Freuters%2FCYOLQ4HWSBALBLGSUYZVVJOMR4.JPG + // https://cloudfront-us-east-2.images.arcpublishing.com/reuters/CYOLQ4HWSBALBLGSUYZVVJOMR4.JPG + newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+[^/]+\/+(https?(?::|%3A).*)$/, "$1"); + if (newsrc !== src) + return decodeuri_ifneeded(newsrc); + } + if (domain_nowww === "nzherald.co.nz" || + // thanks to roi: + // https://www.reuters.com/resizer/v2/CEEOQZWGZRK3NBZAWIEUB2WMPU.jpg?auth=3dd3003638276b10fe50b1fae382cb9ffe6db7eae25bf58e6e5920b9fca5eead&width=960&quality=80 + // https://cloudfront-us-east-2.images.arcpublishing.com/reuters/CEEOQZWGZRK3NBZAWIEUB2WMPU.jpg + // https://www.reuters.com/resizer/v2/https%3A%2F%2Fcloudfront-us-east-2.images.arcpublishing.com%2Freuters%2FCYOLQ4HWSBALBLGSUYZVVJOMR4.JPG?auth=13b9a416c2001d7684d4a72c0c9ebc72c75541cebce462625cc8bd03261fc48d&width=1200&quality=80 + // https://cloudfront-us-east-2.images.arcpublishing.com/reuters/CYOLQ4HWSBALBLGSUYZVVJOMR4.JPG + domain_nowww === "reuters.com" || + // thanks to roi: + // https://www.masslive.com/resizer/v2/BLNXJJL3RJBOTJMHUZVO3F2GHE.jpg?auth=7360c30742429c3c7eaa24a1b24e5355b9951c80b41e582d0a0d4abd0d60afb8&width=1280&quality=90 + // https://cloudfront-us-east-1.images.arcpublishing.com/advancelocal/BLNXJJL3RJBOTJMHUZVO3F2GHE.jpg + domain_nowww === "masslive.com" || + // thanks to roi: + // https://imagenes.elpais.com/resizer/v2/Q65QV6AOQFD67GSRGNODWVDEEQ.jpg?auth=a24d3386f30004dcad48575ed42b4cf3b3cb913397bb4e1485760a34b967b66c&width=828&height=466&smart=true + // https://cloudfront-eu-central-1.images.arcpublishing.com/prisa/Q65QV6AOQFD67GSRGNODWVDEEQ.jpg + domain === "imagenes.elpais.com" || + // thanks to roi: + // https://www.theglobeandmail.com/resizer/v2/MIMBGW3UORBLZMMTL2GASZ75JE.JPG?auth=c570680e25c89027c795085ce398d06291485e026f2830e996db3e2d9a71d3d8&width=900&quality=80 + // https://cloudfront-us-east-1.images.arcpublishing.com/tgam/MIMBGW3UORBLZMMTL2GASZ75JE.JPG + domain_nowww === "theglobeandmail.com") { // thanks to anonymous for reporting: // https://www.nzherald.co.nz/resizer/v2/65XCPLTDZMDJ4ETPGQSD7N5WNY.jpg?auth=845c2b3d0286c0d98e103c70b57a9fd65117bbe22938fd846df62440949479b0&width=1440&height=1795&quality=70&smart=true // https://cloudfront-ap-southeast-2.images.arcpublishing.com/nzme/65XCPLTDZMDJ4ETPGQSD7N5WNY.jpg - var folder_2 = "nzme"; - newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+resizer\/+v2\/+([^?#/]+)(?:[?#].*)?$/, "https://cloudfront-ap-southeast-2.images.arcpublishing.com/" + folder_2 + "/$1"); + var info_1 = { folder: "", loc: "" }; + if (domain_nowww === "nzherald.co.nz") + info_1 = { folder: "nzme", loc: "ap-southeast-2" }; + else if (domain_nowww === "reuters.com") + info_1 = { folder: "reuters", loc: "us-east-2" }; + else if (domain_nowww === "masslive.com") + info_1 = { folder: "advancelocal", loc: "us-east-1" }; + else if (domain_nowww === "theglobeandmail.com") + info_1 = { folder: "tgam", loc: "us-east-1" }; + else if (domain === "imagenes.elpais.com") + info_1 = { folder: "prisa", loc: "eu-central-1" }; + newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+resizer\/+v2\/+([^?#/]+)(?:[?#].*)?$/, "https://cloudfront-" + info_1.loc + ".images.arcpublishing.com/" + info_1.folder + "/$1"); if (newsrc !== src) return newsrc; } @@ -100594,11 +100681,25 @@ var $$IMU_EXPORT$$; // https://st.violity.com/auction/big/auctions/13/75/23/9/137523999.jpg return src.replace(/(\/auction\/+)(?:small|view)(\/+auctions\/+)/, "$1big$2"); } - if (domain === "media.springernature.com") { + if (domain === "media.springernature.com" || + // thanks to roi: + // https://media.nature.com/lw767/magazine-assets/d41586-024-01223-0/d41586-024-01223-0_27010832.jpg?as=webp + // https://media.nature.com/full/magazine-assets/d41586-024-01223-0/d41586-024-01223-0_27010832.jpg + // https://media.nature.com/w140h79/springer-static/image/art%3A10.1038%2Fs41586-024-07339-7/MediaObjects/41586_2024_7339_Fig1_HTML.png + // https://media.nature.com/full/springer-static/image/art%3A10.1038%2Fs41586-024-07339-7/MediaObjects/41586_2024_7339_Fig1_HTML.png + domain === "media.nature.com" || + // thanks to roi: + // https://images.nature.com/w140h79/magazine-assets/d41586-024-01167-5/d41586-024-01167-5_27002754.jpg + // https://images.nature.com/full/magazine-assets/d41586-024-01167-5/d41586-024-01167-5_27002754.jpg + domain === "images.nature.com") { // thanks to anonymous for reporting: // https://media.springernature.com/w300/springer-static/image/art%3A10.1038%2Fs41565-019-0561-4/MediaObjects/41565_2019_561_Figa_HTML.jpg?as=webp // https://media.springernature.com/full/springer-static/image/art%3A10.1038%2Fs41565-019-0561-4/MediaObjects/41565_2019_561_Figa_HTML.jpg - return src.replace(/(:\/\/[^/]+\/+)[wh][0-9]+\/+(.*?)(?:[?#].*)?$/, "$1full/$2"); + // thanks to roi: + // https://media.springernature.com/lw685/springer-static/image/art%3A10.1038%2Fs41467-024-46846-z/MediaObjects/41467_2024_46846_Fig1_HTML.png?as=webp + // https://media.springernature.com/full/springer-static/image/art%3A10.1038%2Fs41467-024-46846-z/MediaObjects/41467_2024_46846_Fig1_HTML.png + //return src.replace(/(:\/\/[^/]+\/+)[wh][0-9]+\/+(.*?)(?:[?#].*)?$/, "$1full/$2"); + return remove_queries(src.replace(/(:\/\/[^/]+\/+)(?:l?w[0-9]+|w[0-9]+h[0-9]+)\//, "$1full/"), ["as"]); } if (domain_nowww === "openverse.org") { newsrc = website_query({ @@ -102865,6 +102966,44 @@ var $$IMU_EXPORT$$; return remove_queries(src, "isPreview"); } } + if (domain_nowww === "swissiceskating.ch") { + // thanks to roi: + // https://www.swissiceskating.ch/_default_upload_bucket/image-thumb__4794__uebersichtListe/speed-quebec.jpg + // https://www.swissiceskating.ch/_default_upload_bucket/speed-quebec.jpeg + newsrc = src.replace(/(\/_default_upload_bucket\/+)image-thumb__[^/]+\/+/, "$1"); + if (newsrc !== src) + return add_extensions_jpeg(newsrc); + // thanks to roi: + // https://www.swissiceskating.ch/_default_upload_bucket/schweizer-frauen-team-pursuit4_16-9.jpeg + // https://www.swissiceskating.ch/_default_upload_bucket/schweizer-frauen-team-pursuit4.jpeg + return src.replace(/(\/_default_upload_bucket\/+[^/]+)_16-9(\.[a-z]+)(?:[?#].*)?$/, "$1$2"); + } + if (domain === "mim.p7s1.io") { + // thanks to roi: + // https://mim.p7s1.io/pis/mw/1a4ajq5FgV8h73OMk30hSmQ3ksnTujGLThfZrJTemL4yREOdH4xmFMinlxemkCY1nZ8eOvuOHXqT69lkeQx2EfPTgCBdofDvzF6jm54Oi70UOg/profile:ezone-teaser940x528 + // https://mim.p7s1.io/pis/mw/1a4ajq5FgV8h73OMk30hSmQ3ksnTujGLThfZrJTemL4yREOdH4xmFMinlxemkCY1nZ8eOvuOHXqT69lkeQx2EfPTgCBdofDvzF6jm54Oi70UOg/profile:original + // https://mim.p7s1.io/pis/ld/e9e8zChLCVyZ-c1vEwXZAanB-DJ78rnq2V2gRWTHzVV6NywNWMSJCEGmZ4YSENP-WRL0b9lo2z_IfR63zTDrzZgVPU1C_Bs-q1UyOtErtP7vQ66yLAURn7F9Qzy_2jxg4stqAOah-GU/profile:original?w=1200&rect=643%2C0%2C3859%2C2894 + // https://mim.p7s1.io/pis/ld/e9e8zChLCVyZ-c1vEwXZAanB-DJ78rnq2V2gRWTHzVV6NywNWMSJCEGmZ4YSENP-WRL0b9lo2z_IfR63zTDrzZgVPU1C_Bs-q1UyOtErtP7vQ66yLAURn7F9Qzy_2jxg4stqAOah-GU/profile:original + return src.replace(/(\/pis\/+[^/]+\/+[^/]+\/+)profile[^/?#]+(?:[?#].*)?$/, "$1profile:original"); + } + if (domain === "storage.fest2024.com") { + // thanks to roi: + // https://storage.fest2024.com/image/photo/images/F92D6E449EE1487C9F0F01D4C8D37B2D/410x280/f=webp + // https://storage.fest2024.com/image/photo/images/F92D6E449EE1487C9F0F01D4C8D37B2D + // https://storage.fest2024.com/image/photo/images/F92D6E449EE1487C9F0F01D4C8D37B2D/410x280/m=crop + // https://storage.fest2024.com/image/photo/images/F92D6E449EE1487C9F0F01D4C8D37B2D + return { + url: src.replace(/(\/image\/+photo\/+images\/+[0-9A-F]{10,})\/.*/, "$1"), + head_wrong_contenttype: true + }; + } + if (domain_nowww === "super.ru") { + // https://super.ru/image/rs::3840:::/quality:5/plain/s3://super-static/prod/62a05d755c72ff4871ebd2ff-1900x.jpeg + // https://super.ru/image/rs:::::/quality:100/plain/s3://super-static/prod/62a05d755c72ff4871ebd2ff-1900x.jpeg + // other: + // https://api.eric.s3storage.ru/super-static/prod/61d88522853cde454af96efa-150x.webp + return src.replace(/\/image\/+.*?s3:\/\//, "/image/rs:::::/quality:100/plain/s3://"); + } // -- 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