diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e9336912..c9d0e696 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,7 +2,7 @@ Improvements: - * Various improvements/fixes to existing rules (including iTunes, Soundcloud, Tumblr) + * Various improvements/fixes to existing rules (including iTunes, Soundcloud, Threads, Tumblr) Bugfixes: diff --git a/src/userscript.ts b/src/userscript.ts index 58200df8..a51c8b7f 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -29094,6 +29094,13 @@ var $$IMU_EXPORT$$; .replace(/\/images\/[^/]*_[^/]*\//, "/images/"); } + if (domain === "www-konga-com-res.cloudinary.com") { + // thanks to anonymous for reporting: + // https://www-konga-com-res.cloudinary.com/w_400,f_auto,fl_lossy,dpr_3.0,q_auto/media/catalog/product/N/a/68975_1516157735.jpg + // https://www-konga-com-res.cloudinary.com/media/catalog/product/N/a/68975_1516157735.jpg + return src.replace(/(:\/\/[^/]+\/+).*?\/+media\//, "$1media/"); + } + if (((domain_nosub === "biography.com" || domain_nowww === "guitarworld.com" || domain_nowww === "guitaraficionado.com" || @@ -32957,9 +32964,6 @@ var $$IMU_EXPORT$$; // https://metac.nxtv.jp/img/info/video/0000201/tit/D0240104-001/D0240104-001_D0240104-001-0010.jpg?output-format=webp&output-quality=60&resize=336:* (domain === "metac.nxtv.jp" && /\/img\//.test(src)) || // thanks to anonymous for reporting: - // https://media-assets.grailed.com/prd/listing/temp/566bb1a355784bfba56883862d980d4a?w=123&h=164&fit=crop&auto=format - domain === "media-assets.grailed.com" || - // thanks to anonymous for reporting: // https://media.victorinox.com/transform/b450ab5b-7c72-4004-bb26-8d9d710ea4dd/SAK_3_0224_3CN__S3-tif?io=transform%3Afit%2Cwidth%3A1100%2Cheight%3A830&quality=80 (domain === "media.victorinox.com" && string_indexof(src, "/transform/") >= 0) || // thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1292 @@ -32988,6 +32992,12 @@ var $$IMU_EXPORT$$; // thanks to fireattack on discord: // https://prcdn.freetls.fastly.net/release_image/19470/3747/19470-3747-5201a2b2b273708df18ca35314266072-3900x2600.jpg?format=jpeg&auto=webp&quality=85%2C65&width=1950&height=1350&fit=bounds domain === "prcdn.freetls.fastly.net" || + // thanks to anonymous for reporting: + // https://www.filmfest-muenchen.de/Pictures/Filme/118/7614/Call_me_Levi-online1_neu.jpg?width=1280 + (domain_nowww === "filmfest-muenchen.de" && string_indexof(src, "/Pictures/") >= 0) || + // thanks to anonymous for reporting: + // https://cdn.hobbyconsolas.com/sites/navi.axelspringer.es/public/media/image/2014/09/388292-caja-metalica-contenidos-exclusivos-comprar-ravens-cry-game.jpg?tf=1200x + domain === "cdn.hobbyconsolas.com" || // 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\//) || @@ -33106,6 +33116,9 @@ var $$IMU_EXPORT$$; // thanks to n0099 on github: https://github.com/qsniyg/maxurl/issues/1314 // https://steamcommunity-a.akamaihd.net/chat/image/ytVLh2iuegcBz8cmwozQlRfu4DI9bkP3nqrIsC2towJsb9Vg8-QAX71yzn1RAw/share_image.jpg?s=256x140 (domain === "steamcommunity-a.akamaihd.net" && string_indexof(src, "/image/") >= 0) || + // thanks to anonymous for reporting: + // https://media-assets.grailed.com/prd/listing/temp/566bb1a355784bfba56883862d980d4a?w=123&h=164&fit=crop&auto=format + domain === "media-assets.grailed.com" || // thanks to MinuteAd8502 on github: https://github.com/qsniyg/maxurl/issues/874 // https://img01.ztat.net/article/spp-media-p1/369ffb094cae4443bee45519929dddb8/4269d8d79cfe418888fdc155bf1a8e2e.jpg?imwidth=762 // https://img01.ztat.net/article/spp-media-p1/369ffb094cae4443bee45519929dddb8/4269d8d79cfe418888fdc155bf1a8e2e.jpg -- 1801x2600 @@ -33163,7 +33176,11 @@ var $$IMU_EXPORT$$; // thanks to TheLastZombie on github: https://github.com/qsniyg/maxurl/issues/1055 // https://fantasytopics.com/wp-content/uploads/2022/07/Ore-Distribution-735x631.jpg.webp // https://fantasytopics.com/wp-content/uploads/2022/07/Ore-Distribution.jpg - domain_nowww === "fantasytopics.com") && /\/wp-content\/+uploads\//.test(src)) { + domain_nowww === "fantasytopics.com") && /\/wp-content\/+uploads\//.test(src) || + // thanks to anonymous for reporting: + // https://mmerevise.co.uk/app/uploads/2023/05/GCSE-English-Cards-How-they-look-NEW-2-1536x1089.png.webp + // https://mmerevise.co.uk/app/uploads/2023/05/GCSE-English-Cards-How-they-look-NEW-2.png + (domain_nowww === "mmerevise.co.uk" && /\/app\/+uploads\//.test(src))) { // thanks to roi: // https://www.elindependiente.com/wp-content/uploads/2023/02/6bb9b138ba3df401a3040dc097e383ff9b8bc9a2-672x375.jpg.webp // https://www.elindependiente.com/wp-content/uploads/2023/02/6bb9b138ba3df401a3040dc097e383ff9b8bc9a2.jpg @@ -48358,6 +48375,13 @@ var $$IMU_EXPORT$$; return src.replace(/s(\.[^/.]*)$/, "$1"); } + if (domain === "blogthumbnail.fc2.com") { + // thanks to anonymous for reporting: + // https://blogthumbnail.fc2.com/r72/102/d/i/a/dia3/fc2blog_20181110193158e7e.jpg + // https://blog-imgs-102-origin.fc2.com/d/i/a/dia3/fc2blog_20181110193158e7e.jpg + return src.replace(/:\/\/[^/]+\/+r[0-9]+\/+([0-9]+)\/+/, "://blog-imgs-$1.fc2.com/"); + } + if (domain === "video.fc2.com") { var query_fc2 = function(pageurl, token, id, cb) { api_query("fc2_api:" + id, { @@ -61780,6 +61804,26 @@ var $$IMU_EXPORT$$; return src.replace(/(:\/\/[^/]*\/)_[a-z]+Image\//, "$1"); } + if (domain === "img.budgettravel.com") { + // https://img.budgettravel.com/_relatedContentImage/Arches-Zoom-Background.jpg?mtime=20200408124252 + // https://img.budgettravel.com/_contentHero/Arches-Zoom-Background.jpg?mtime=20200408124252 + // https://img.budgettravel.com/Arches-Zoom-Background.jpg?mtime=20200408124252 -- watermark + // https://img.budgettravel.com/_galleryImage/golden-gate-bridge-san-francisco-952012-114744_original.jpeg?mtime=20140903194435 + // https://img.budgettravel.com/golden-gate-bridge-san-francisco-952012-114744_original.jpeg?mtime=20140903194435 -- no watermark + // https://img.budgettravel.com/_thumbnailSquare/Yosemite_1251853.jpg?mtime=20170410164711 + // https://img.budgettravel.com/Yosemite_1251853.jpg?mtime=20170410164711 + return src.replace(/(:\/\/[^/]+\/+)_[a-zA-Z]+\/+/, "$1"); + } + + if (amazon_container === "festivalkontoret") { + // thanks to anonymous for reporting: + // https://s3.eu-central-1.amazonaws.com/festivalkontoret/nyheter/2021/_indexImage/Maiwenn-%C2%A9-Ste%CC%81phanie-Branchu-Why-Not-Productions-1_2023-08-24-083503_bbpj.png + // https://s3.eu-central-1.amazonaws.com/festivalkontoret/nyheter/2021/Maiwenn-%C2%A9-Ste%CC%81phanie-Branchu-Why-Not-Productions-1_2023-08-24-083503_bbpj.png + // https://s3.eu-central-1.amazonaws.com/festivalkontoret/nyheter/2021/_articleFullWidth/Maiwenn-%C2%A9-Ste%CC%81phanie-Branchu-Why-Not-Productions-1_2023-08-24-083503_bbpj.png + // https://s3.eu-central-1.amazonaws.com/festivalkontoret/nyheter/2021/Maiwenn-%C2%A9-Ste%CC%81phanie-Branchu-Why-Not-Productions-1_2023-08-24-083503_bbpj.png + return src.replace(/\/_[a-zA-Z]+\/+([^/]+)$/, "/$1"); + } + if ((domain_nosub === "ellingtoncms.com" && domain.match(/\.media\.clients\.ellingtoncms\.com$/)) || // https://media.lasvegasweekly.com/img/photos/2019/10/22/1024_Nights_Union_20191024_CB_t190.jpg?8f7e25bf5d9051e52786571508cc6ab35225febe @@ -93884,17 +93928,6 @@ var $$IMU_EXPORT$$; return src.replace(/(\/images\/+models\/+[0-9]+\/+)thumb\/+/i, "$1"); } - if (domain === "img.budgettravel.com") { - // https://img.budgettravel.com/_relatedContentImage/Arches-Zoom-Background.jpg?mtime=20200408124252 - // https://img.budgettravel.com/_contentHero/Arches-Zoom-Background.jpg?mtime=20200408124252 - // https://img.budgettravel.com/Arches-Zoom-Background.jpg?mtime=20200408124252 -- watermark - // https://img.budgettravel.com/_galleryImage/golden-gate-bridge-san-francisco-952012-114744_original.jpeg?mtime=20140903194435 - // https://img.budgettravel.com/golden-gate-bridge-san-francisco-952012-114744_original.jpeg?mtime=20140903194435 -- no watermark - // https://img.budgettravel.com/_thumbnailSquare/Yosemite_1251853.jpg?mtime=20170410164711 - // https://img.budgettravel.com/Yosemite_1251853.jpg?mtime=20170410164711 - return src.replace(/(:\/\/[^/]+\/+)_[a-zA-Z]+\/+/, "$1"); - } - if (domain === "d3ts7pb9ldoin4.cloudfront.net" || // https://star-uploads.s3-us-west-2.amazonaws.com/uploads/users/9356/tier_covers/fb980420-356b-4db8-bc72-d281515c2551-120x120_1x0_616x616.jpg // https://star-uploads.s3-us-west-2.amazonaws.com/uploads/users/9356/tier_covers/fb980420-356b-4db8-bc72-d281515c2551.jpg @@ -94664,6 +94697,12 @@ var $$IMU_EXPORT$$; // = {"bucket":"fdc-sitepublic-media-prod","key":"uploads\/2023\/03\/80494.jpg","edits":{"resize":{"width":296,"fit":"cover"},"toFormat":"webp"}} domain === "d27csu38upkiqd.cloudfront.net" || // thanks to anonymous for reporting: + // https://images.are.na/eyJidWNrZXQiOiJhcmVuYV9pbWFnZXMiLCJrZXkiOiIyNzkwNDg2NC9vcmlnaW5hbF9iOGVjYWU4Zjc4ZTIzNWJmZWJjYzlhZTAxM2IwYTkwNy5qcGciLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjI0MDAsImhlaWdodCI6MjQwMCwiZml0IjoiaW5zaWRlIiwid2l0aG91dEVubGFyZ2VtZW50Ijp0cnVlfSwid2VicCI6eyJxdWFsaXR5Ijo2NX0sImpwZWciOnsicXVhbGl0eSI6NjV9LCJyb3RhdGUiOm51bGx9fQ== + // https://images.are.na/eyJidWNrZXQiOiJhcmVuYV9pbWFnZXMiLCJrZXkiOiIyNzkwNDg2NC9vcmlnaW5hbF9iOGVjYWU4Zjc4ZTIzNWJmZWJjYzlhZTAxM2IwYTkwNy5qcGcifQ== + // atob: + // = {"bucket":"arena_images","key":"27904864/original_b8ecae8f78e235bfebcc9ae013b0a907.jpg","edits":{"resize":{"width":2400,"height":2400,"fit":"inside","withoutEnlargement":true},"webp":{"quality":65},"jpeg":{"quality":65},"rotate":null}} + domain === "images.are.na" || + // thanks to anonymous for reporting: // https://images.ams-prd.blv.cloud/eyJidWNrZXQiOiJpbWFnZXMtcHJkLTFvNHV6OXpieHd6cDF1Ym0iLCJrZXkiOiJkYTkwNjE5Yy0yOGVkLTRjMDYtOTkzNi03Y2EzNGE1NjI1MzQiLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjM2MCwiaGVpZ2h0IjozNjB9fX0= // https://images.ams-prd.blv.cloud/eyJidWNrZXQiOiJpbWFnZXMtcHJkLTFvNHV6OXpieHd6cDF1Ym0iLCJrZXkiOiJkYTkwNjE5Yy0yOGVkLTRjMDYtOTkzNi03Y2EzNGE1NjI1MzQifQ== // atob: @@ -109083,6 +109122,16 @@ var $$IMU_EXPORT$$; return newsrc; } + if (domain_nowww === "nzherald.co.nz") { + // 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"); + if (newsrc !== src) + return newsrc; + } + if (domain_nowww === "lqj.ch") { // thanks to roi: // https://www.lqj.ch/media/image/15/large_3_2/67b663ae-ee6b-4f64-b324-96392949a20e.jpg.webp @@ -110015,6 +110064,28 @@ var $$IMU_EXPORT$$; } if (domain_nowww === "threads.net" && options && options.do_request && options.cb) { + let threads_get_csrf = function(cb) { + if (!options.get_cookies) { + console_error("No cookie support"); + return cb(null); + } + + options.get_cookies("https://www.threads.net/", function(cookies) { + if (!cookies) { + console_error("Unable to get cookies for threads"); + return cb(null); + } + + cookies = headers_list_to_dict(cookies); + if (!("csrftoken" in cookies)) { + console_error("csrftoken doesn't exist, try visiting threads.net"); + return cb(null); + } + + cb(cookies["csrftoken"] || null); + }); + }; + let threads_get_lsd_token = function(cb) { api_query("threads:lsd", { url: "https://www.threads.net/" @@ -110030,6 +110101,17 @@ var $$IMU_EXPORT$$; }); }; + let threads_get_tokens = function(cb) { + threads_get_csrf(csrf => { + if (!csrf) + return cb(null); + + threads_get_lsd_token(token => { + cb({csrf, lsd: token}); + }); + }); + }; + let threads_get_best_image = function(candidates) { var has_nonsquare = false; @@ -110057,11 +110139,16 @@ var $$IMU_EXPORT$$; }; let threads_apicall = function(query, cb) { - threads_get_lsd_token(function(token) { + threads_get_tokens(function(tokens) { + if (!tokens) + return cb(null); + if (!query.lsd) - query.lsd = token; + query.lsd = tokens.lsd; if (!("server_timestamps" in query)) - query.server_timestamps = true; + query.server_timestamps = "true"; + if (!query.fb_api_caller_class) + query.fb_api_caller_class = "RelayModern"; if (query.variables && typeof query.variables !== "string") { query.variables = JSON_stringify(query.variables); @@ -110081,8 +110168,9 @@ var $$IMU_EXPORT$$; "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-origin", "X-Asbd-Id": "129477", + "X-Csrftoken": tokens.csrf, "X-Fb-Friendly-Name": query.fb_api_req_friendly_name, - "X-Fb-Lsd": token, + "X-Fb-Lsd": tokens.lsd, "X-Ig-App-Id": "238260118697367" }, onload: function(resp) { @@ -110110,14 +110198,25 @@ var $$IMU_EXPORT$$; api_cache.fetch(cache_key, cb, function(done) { threads_apicall({ fb_api_req_friendly_name: "BarcelonaPostPageQuery", - doc_id: "6529829603744567", - variables: {"postID": postid} + doc_id: "7074652575968011", + variables: { + "postID": postid, + "__relay_internal__pv__BarcelonaIsLoggedInrelayprovider": false, + "__relay_internal__pv__BarcelonaIsOriginalPostPillEnabledrelayprovider": false, + "__relay_internal__pv__BarcelonaIsThreadContextHeaderEnabledrelayprovider": false, + "__relay_internal__pv__BarcelonaShouldShowFediverseM1Featuresrelayprovider": false, + "__relay_internal__pv__BarcelonaIsInlineReelsEnabledrelayprovider": false, + "__relay_internal__pv__BarcelonaUseCometVideoPlaybackEnginerelayprovider": false, + "__relay_internal__pv__BarcelonaOptionalCookiesEnabledrelayprovider": true, + "__relay_internal__pv__BarcelonaShouldShowFediverseM075Featuresrelayprovider": false + } }, function(data) { if (!data) { return done(null, false); } - let thread_items = data.data.data.containing_thread.thread_items; + let thread_items = data.data.data.edges[0].node.thread_items; + //let thread_items = data.data.data.containing_thread.thread_items; for (let item of thread_items) { if (item.post.pk === postid) { return done(item.post, 60*60); @@ -113140,9 +113239,10 @@ var $$IMU_EXPORT$$; // https://wallpapers.com/images/high/aesthetic-simple-bathroom-interior-design-kbvt8bek9oihslv6.webp // https://wallpapers.com/images/hd/aesthetic-simple-bathroom-interior-design-kbvt8bek9oihslv6.webp -- 1298x1920 // https://wallpapers.com/images/hd4/aesthetic-simple-bathroom-interior-design-kbvt8bek9oihslv6.jpg -- 3309x4896 + // https://wallpapers.com/images/file/aesthetic-simple-bathroom-interior-design-kbvt8bek9oihslv6.jpg -- 3309x4896 return src - .replace(/(\/images\/+hd4\/+[^/]+)\.webp(?:[?#].*)?$/, "$1.jpg") - .replace(/(\/images\/+)(?:thumb(?:nail)?|high|hd)\/+/, "$1hd4/"); + .replace(/(\/images\/+file\/+[^/]+)\.webp(?:[?#].*)?$/, "$1.jpg") + .replace(/(\/images\/+)(?:thumb(?:nail)?|high|hd4?)\/+/, "$1file/"); } if (domain === "images.kolonmall.com") { @@ -113982,6 +114082,66 @@ var $$IMU_EXPORT$$; return src.replace(/(\/Images\/+)([0-9]+\.[a-z]+)(?:[?#].*)?$/, "$1f_$2"); } + if (domain_nowww === "dr-johanna-budwig.de") { + // thanks to anonymous for reporting: + // https://www.dr-johanna-budwig.de/cdn/thumbnail/ef/33/9f/1604563448/dr-johanna-budwig_1_800x800.jpg + // https://www.dr-johanna-budwig.de/cdn/media/ef/33/9f/1604563448/dr-johanna-budwig_1.jpg + return src.replace(/(\/cdn\/+)thumbnail\/+(.*?)_[0-9]+x[0-9]+(\.[a-z]+)(?:[?#].*)?$/, "$1media/$2$3"); + } + + if (domain_nowww === "otakurepublic.com") { + // thanks to anonymous for reporting: + // https://otakurepublic.com/media/binary/008/579/851/8579851.jpg.l_thumbnail.webp + // https://otakurepublic.com/media/binary/008/579/851/8579851.jpg + return src.replace(/(\/media\/+binary\/+.*?\.[a-z]+)\.[^/.]+\.webp(?:[?#].*)?$/, "$1"); + } + + if (domain === "scout.wgimager.com") { + // thanks to anonymous for reporting: + // https://scout.wgimager.com/w_280/h_218/q_90/f_webp/https://static.wgplayground.com/9c4ff820045f60da93b33777fd8bc8ec/wgplayground/c2d948d1ead59940f7af2e9331c86867.jpg + // https://static.wgplayground.com/9c4ff820045f60da93b33777fd8bc8ec/wgplayground/c2d948d1ead59940f7af2e9331c86867.jpg + return src.replace(/^[a-z]+:\/\/[^/]+\/+(?:[whqf]_[^/]+\/+)+(https?:\/\/)/, "$1"); + } + + if (domain_nowww === "trustnordisk.com") { + // thanks to anonymous for reporting: + // https://trustnordisk.com/fileadmin/_processed_/f/8/csm_Hovedstill_Mr._Freeman_Zentropa_Foto_Christian_Geisnaes__2000x1200__d8dd7379aa.jpg + // https://trustnordisk.com/fileadmin/user_upload/Hovedstill_Mr._Freeman_Zentropa_Foto_Christian_Geisnaes__2000x1200_.jpg + return src.replace(/(\/fileadmin\/+)_processed_\/+(?:[0-9a-f]\/+){2}csm_([^/]+)_[0-9a-f]+\./, "$1user_upload/$2."); + } + + if (domain_nowww === "cinemacrush.com") { + // https://cinemacrush.com/assets/play.png + if (/\/assets\/+play\.png(?:[?#].*)?$/.test(src)) { + return { + url: src, + bad: "mask" + }; + } + + // thanks to anonymous for reporting: + // https://cinemacrush.com/media/the-end-of-summer/w185/A6UFgNyH35qsIEiqIc6o2xmkRQa.jpg + // https://cinemacrush.com/media/the-end-of-summer/original/A6UFgNyH35qsIEiqIc6o2xmkRQa.jpg + return src.replace(/(\/media\/+[^/]+\/+)[wh][0-9]+\/+/, "$1original/"); + } + + if (domain_nowww === "characterai.io") { + // https://characterai.io/i/80/static/avatars/uploaded/2022/10/6/igor/socrates.webp?webp=true&anim=0 + // https://characterai.io/i/200/static/avatars/uploaded/2022/10/6/igor/socrates.webp?webp=true&anim=0 + newsrc = src.replace(/\/i\/+80\/+/, "/i/200/"); + if (newsrc !== src) + return newsrc; + + if (!/\/static\/+avatars\/+uploaded\//.test(src)) { + // thanks to anonymous for reporting: + // https://characterai.io/i/80/static/avatars/TextAdventure3.png?webp=true&anim=0 + // https://characterai.io/static/avatars/TextAdventure3.png + // doesn't work for all: + // https://characterai.io/i/80/static/avatars/uploaded/2022/10/6/igor/socrates.webp?webp=true&anim=0 + return src.replace(/\/i\/+[0-9]+\/+static\/+(.*?)(?:[?#].*)?$/, "/static/$1"); + } + } + diff --git a/userscript.user.js b/userscript.user.js index 044ba056..be8dcf9b 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -26546,6 +26546,12 @@ var $$IMU_EXPORT$$; .replace(/\/image\/upload\/[^/]*_[^/]*\//, "/image/upload/") .replace(/\/images\/[^/]*_[^/]*\//, "/images/"); } + if (domain === "www-konga-com-res.cloudinary.com") { + // thanks to anonymous for reporting: + // https://www-konga-com-res.cloudinary.com/w_400,f_auto,fl_lossy,dpr_3.0,q_auto/media/catalog/product/N/a/68975_1516157735.jpg + // https://www-konga-com-res.cloudinary.com/media/catalog/product/N/a/68975_1516157735.jpg + return src.replace(/(:\/\/[^/]+\/+).*?\/+media\//, "$1media/"); + } if (((domain_nosub === "biography.com" || domain_nowww === "guitarworld.com" || domain_nowww === "guitaraficionado.com" || @@ -30116,9 +30122,6 @@ var $$IMU_EXPORT$$; // https://metac.nxtv.jp/img/info/video/0000201/tit/D0240104-001/D0240104-001_D0240104-001-0010.jpg?output-format=webp&output-quality=60&resize=336:* (domain === "metac.nxtv.jp" && /\/img\//.test(src)) || // thanks to anonymous for reporting: - // https://media-assets.grailed.com/prd/listing/temp/566bb1a355784bfba56883862d980d4a?w=123&h=164&fit=crop&auto=format - domain === "media-assets.grailed.com" || - // thanks to anonymous for reporting: // https://media.victorinox.com/transform/b450ab5b-7c72-4004-bb26-8d9d710ea4dd/SAK_3_0224_3CN__S3-tif?io=transform%3Afit%2Cwidth%3A1100%2Cheight%3A830&quality=80 (domain === "media.victorinox.com" && string_indexof(src, "/transform/") >= 0) || // thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1292 @@ -30147,6 +30150,12 @@ var $$IMU_EXPORT$$; // thanks to fireattack on discord: // https://prcdn.freetls.fastly.net/release_image/19470/3747/19470-3747-5201a2b2b273708df18ca35314266072-3900x2600.jpg?format=jpeg&auto=webp&quality=85%2C65&width=1950&height=1350&fit=bounds domain === "prcdn.freetls.fastly.net" || + // thanks to anonymous for reporting: + // https://www.filmfest-muenchen.de/Pictures/Filme/118/7614/Call_me_Levi-online1_neu.jpg?width=1280 + (domain_nowww === "filmfest-muenchen.de" && string_indexof(src, "/Pictures/") >= 0) || + // thanks to anonymous for reporting: + // https://cdn.hobbyconsolas.com/sites/navi.axelspringer.es/public/media/image/2014/09/388292-caja-metalica-contenidos-exclusivos-comprar-ravens-cry-game.jpg?tf=1200x + domain === "cdn.hobbyconsolas.com" || // 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\//) || @@ -30263,6 +30272,9 @@ var $$IMU_EXPORT$$; // thanks to n0099 on github: https://github.com/qsniyg/maxurl/issues/1314 // https://steamcommunity-a.akamaihd.net/chat/image/ytVLh2iuegcBz8cmwozQlRfu4DI9bkP3nqrIsC2towJsb9Vg8-QAX71yzn1RAw/share_image.jpg?s=256x140 (domain === "steamcommunity-a.akamaihd.net" && string_indexof(src, "/image/") >= 0) || + // thanks to anonymous for reporting: + // https://media-assets.grailed.com/prd/listing/temp/566bb1a355784bfba56883862d980d4a?w=123&h=164&fit=crop&auto=format + domain === "media-assets.grailed.com" || // thanks to MinuteAd8502 on github: https://github.com/qsniyg/maxurl/issues/874 // https://img01.ztat.net/article/spp-media-p1/369ffb094cae4443bee45519929dddb8/4269d8d79cfe418888fdc155bf1a8e2e.jpg?imwidth=762 // https://img01.ztat.net/article/spp-media-p1/369ffb094cae4443bee45519929dddb8/4269d8d79cfe418888fdc155bf1a8e2e.jpg -- 1801x2600 @@ -30315,7 +30327,11 @@ var $$IMU_EXPORT$$; // thanks to TheLastZombie on github: https://github.com/qsniyg/maxurl/issues/1055 // https://fantasytopics.com/wp-content/uploads/2022/07/Ore-Distribution-735x631.jpg.webp // https://fantasytopics.com/wp-content/uploads/2022/07/Ore-Distribution.jpg - domain_nowww === "fantasytopics.com") && /\/wp-content\/+uploads\//.test(src)) { + domain_nowww === "fantasytopics.com") && /\/wp-content\/+uploads\//.test(src) || + // thanks to anonymous for reporting: + // https://mmerevise.co.uk/app/uploads/2023/05/GCSE-English-Cards-How-they-look-NEW-2-1536x1089.png.webp + // https://mmerevise.co.uk/app/uploads/2023/05/GCSE-English-Cards-How-they-look-NEW-2.png + (domain_nowww === "mmerevise.co.uk" && /\/app\/+uploads\//.test(src))) { // thanks to roi: // https://www.elindependiente.com/wp-content/uploads/2023/02/6bb9b138ba3df401a3040dc097e383ff9b8bc9a2-672x375.jpg.webp // https://www.elindependiente.com/wp-content/uploads/2023/02/6bb9b138ba3df401a3040dc097e383ff9b8bc9a2.jpg @@ -44135,6 +44151,12 @@ var $$IMU_EXPORT$$; return newsrc; return src.replace(/s(\.[^/.]*)$/, "$1"); } + if (domain === "blogthumbnail.fc2.com") { + // thanks to anonymous for reporting: + // https://blogthumbnail.fc2.com/r72/102/d/i/a/dia3/fc2blog_20181110193158e7e.jpg + // https://blog-imgs-102-origin.fc2.com/d/i/a/dia3/fc2blog_20181110193158e7e.jpg + return src.replace(/:\/\/[^/]+\/+r[0-9]+\/+([0-9]+)\/+/, "://blog-imgs-$1.fc2.com/"); + } if (domain === "video.fc2.com") { var query_fc2 = function(pageurl, token, id, cb) { api_query("fc2_api:" + id, { @@ -56099,6 +56121,24 @@ var $$IMU_EXPORT$$; // https://cdn.cretalive.gr/groilandia-pagobouno.jpg?mtime=20180713135637 return src.replace(/(:\/\/[^/]*\/)_[a-z]+Image\//, "$1"); } + if (domain === "img.budgettravel.com") { + // https://img.budgettravel.com/_relatedContentImage/Arches-Zoom-Background.jpg?mtime=20200408124252 + // https://img.budgettravel.com/_contentHero/Arches-Zoom-Background.jpg?mtime=20200408124252 + // https://img.budgettravel.com/Arches-Zoom-Background.jpg?mtime=20200408124252 -- watermark + // https://img.budgettravel.com/_galleryImage/golden-gate-bridge-san-francisco-952012-114744_original.jpeg?mtime=20140903194435 + // https://img.budgettravel.com/golden-gate-bridge-san-francisco-952012-114744_original.jpeg?mtime=20140903194435 -- no watermark + // https://img.budgettravel.com/_thumbnailSquare/Yosemite_1251853.jpg?mtime=20170410164711 + // https://img.budgettravel.com/Yosemite_1251853.jpg?mtime=20170410164711 + return src.replace(/(:\/\/[^/]+\/+)_[a-zA-Z]+\/+/, "$1"); + } + if (amazon_container === "festivalkontoret") { + // thanks to anonymous for reporting: + // https://s3.eu-central-1.amazonaws.com/festivalkontoret/nyheter/2021/_indexImage/Maiwenn-%C2%A9-Ste%CC%81phanie-Branchu-Why-Not-Productions-1_2023-08-24-083503_bbpj.png + // https://s3.eu-central-1.amazonaws.com/festivalkontoret/nyheter/2021/Maiwenn-%C2%A9-Ste%CC%81phanie-Branchu-Why-Not-Productions-1_2023-08-24-083503_bbpj.png + // https://s3.eu-central-1.amazonaws.com/festivalkontoret/nyheter/2021/_articleFullWidth/Maiwenn-%C2%A9-Ste%CC%81phanie-Branchu-Why-Not-Productions-1_2023-08-24-083503_bbpj.png + // https://s3.eu-central-1.amazonaws.com/festivalkontoret/nyheter/2021/Maiwenn-%C2%A9-Ste%CC%81phanie-Branchu-Why-Not-Productions-1_2023-08-24-083503_bbpj.png + return src.replace(/\/_[a-zA-Z]+\/+([^/]+)$/, "/$1"); + } if ((domain_nosub === "ellingtoncms.com" && domain.match(/\.media\.clients\.ellingtoncms\.com$/)) || // https://media.lasvegasweekly.com/img/photos/2019/10/22/1024_Nights_Union_20191024_CB_t190.jpg?8f7e25bf5d9051e52786571508cc6ab35225febe @@ -84402,16 +84442,6 @@ var $$IMU_EXPORT$$; // http://www.zarzarmodels.com/Images/Models/1291/beautiful-blonde-fashion-model-kathryn-portrait.jpg return src.replace(/(\/images\/+models\/+[0-9]+\/+)thumb\/+/i, "$1"); } - if (domain === "img.budgettravel.com") { - // https://img.budgettravel.com/_relatedContentImage/Arches-Zoom-Background.jpg?mtime=20200408124252 - // https://img.budgettravel.com/_contentHero/Arches-Zoom-Background.jpg?mtime=20200408124252 - // https://img.budgettravel.com/Arches-Zoom-Background.jpg?mtime=20200408124252 -- watermark - // https://img.budgettravel.com/_galleryImage/golden-gate-bridge-san-francisco-952012-114744_original.jpeg?mtime=20140903194435 - // https://img.budgettravel.com/golden-gate-bridge-san-francisco-952012-114744_original.jpeg?mtime=20140903194435 -- no watermark - // https://img.budgettravel.com/_thumbnailSquare/Yosemite_1251853.jpg?mtime=20170410164711 - // https://img.budgettravel.com/Yosemite_1251853.jpg?mtime=20170410164711 - return src.replace(/(:\/\/[^/]+\/+)_[a-zA-Z]+\/+/, "$1"); - } if (domain === "d3ts7pb9ldoin4.cloudfront.net" || // https://star-uploads.s3-us-west-2.amazonaws.com/uploads/users/9356/tier_covers/fb980420-356b-4db8-bc72-d281515c2551-120x120_1x0_616x616.jpg // https://star-uploads.s3-us-west-2.amazonaws.com/uploads/users/9356/tier_covers/fb980420-356b-4db8-bc72-d281515c2551.jpg @@ -85095,6 +85125,12 @@ var $$IMU_EXPORT$$; // = {"bucket":"fdc-sitepublic-media-prod","key":"uploads\/2023\/03\/80494.jpg","edits":{"resize":{"width":296,"fit":"cover"},"toFormat":"webp"}} domain === "d27csu38upkiqd.cloudfront.net" || // thanks to anonymous for reporting: + // https://images.are.na/eyJidWNrZXQiOiJhcmVuYV9pbWFnZXMiLCJrZXkiOiIyNzkwNDg2NC9vcmlnaW5hbF9iOGVjYWU4Zjc4ZTIzNWJmZWJjYzlhZTAxM2IwYTkwNy5qcGciLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjI0MDAsImhlaWdodCI6MjQwMCwiZml0IjoiaW5zaWRlIiwid2l0aG91dEVubGFyZ2VtZW50Ijp0cnVlfSwid2VicCI6eyJxdWFsaXR5Ijo2NX0sImpwZWciOnsicXVhbGl0eSI6NjV9LCJyb3RhdGUiOm51bGx9fQ== + // https://images.are.na/eyJidWNrZXQiOiJhcmVuYV9pbWFnZXMiLCJrZXkiOiIyNzkwNDg2NC9vcmlnaW5hbF9iOGVjYWU4Zjc4ZTIzNWJmZWJjYzlhZTAxM2IwYTkwNy5qcGcifQ== + // atob: + // = {"bucket":"arena_images","key":"27904864/original_b8ecae8f78e235bfebcc9ae013b0a907.jpg","edits":{"resize":{"width":2400,"height":2400,"fit":"inside","withoutEnlargement":true},"webp":{"quality":65},"jpeg":{"quality":65},"rotate":null}} + domain === "images.are.na" || + // thanks to anonymous for reporting: // https://images.ams-prd.blv.cloud/eyJidWNrZXQiOiJpbWFnZXMtcHJkLTFvNHV6OXpieHd6cDF1Ym0iLCJrZXkiOiJkYTkwNjE5Yy0yOGVkLTRjMDYtOTkzNi03Y2EzNGE1NjI1MzQiLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjM2MCwiaGVpZ2h0IjozNjB9fX0= // https://images.ams-prd.blv.cloud/eyJidWNrZXQiOiJpbWFnZXMtcHJkLTFvNHV6OXpieHd6cDF1Ym0iLCJrZXkiOiJkYTkwNjE5Yy0yOGVkLTRjMDYtOTkzNi03Y2EzNGE1NjI1MzQifQ== // atob: @@ -97960,6 +97996,15 @@ var $$IMU_EXPORT$$; if (newsrc !== src) return newsrc; } + if (domain_nowww === "nzherald.co.nz") { + // 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"); + if (newsrc !== src) + return newsrc; + } if (domain_nowww === "lqj.ch") { // thanks to roi: // https://www.lqj.ch/media/image/15/large_3_2/67b663ae-ee6b-4f64-b324-96392949a20e.jpg.webp @@ -98797,6 +98842,24 @@ var $$IMU_EXPORT$$; return src.replace(/(\/m2img\/+)(?:small_)?image\//, "$1image/"); } if (domain_nowww === "threads.net" && options && options.do_request && options.cb) { + var threads_get_csrf_1 = function(cb) { + if (!options.get_cookies) { + console_error("No cookie support"); + return cb(null); + } + options.get_cookies("https://www.threads.net/", function(cookies) { + if (!cookies) { + console_error("Unable to get cookies for threads"); + return cb(null); + } + cookies = headers_list_to_dict(cookies); + if (!("csrftoken" in cookies)) { + console_error("csrftoken doesn't exist, try visiting threads.net"); + return cb(null); + } + cb(cookies["csrftoken"] || null); + }); + }; var threads_get_lsd_token_1 = function(cb) { api_query("threads:lsd", { url: "https://www.threads.net/" @@ -98810,6 +98873,15 @@ var $$IMU_EXPORT$$; return done(token, 60 * 60); }); }; + var threads_get_tokens_1 = function(cb) { + threads_get_csrf_1(function(csrf) { + if (!csrf) + return cb(null); + threads_get_lsd_token_1(function(token) { + cb({ csrf: csrf, lsd: token }); + }); + }); + }; var threads_get_best_image_1 = function(candidates) { var has_nonsquare = false; for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) { @@ -98832,11 +98904,15 @@ var $$IMU_EXPORT$$; return candidates[0]; }; var threads_apicall_1 = function(query, cb) { - threads_get_lsd_token_1(function(token) { + threads_get_tokens_1(function(tokens) { + if (!tokens) + return cb(null); if (!query.lsd) - query.lsd = token; + query.lsd = tokens.lsd; if (!("server_timestamps" in query)) - query.server_timestamps = true; + query.server_timestamps = "true"; + if (!query.fb_api_caller_class) + query.fb_api_caller_class = "RelayModern"; if (query.variables && typeof query.variables !== "string") { query.variables = JSON_stringify(query.variables); } @@ -98854,8 +98930,9 @@ var $$IMU_EXPORT$$; "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-origin", "X-Asbd-Id": "129477", + "X-Csrftoken": tokens.csrf, "X-Fb-Friendly-Name": query.fb_api_req_friendly_name, - "X-Fb-Lsd": token, + "X-Fb-Lsd": tokens.lsd, "X-Ig-App-Id": "238260118697367" }, onload: function(resp) { @@ -98880,13 +98957,24 @@ var $$IMU_EXPORT$$; api_cache.fetch(cache_key, cb, function(done) { threads_apicall_1({ fb_api_req_friendly_name: "BarcelonaPostPageQuery", - doc_id: "6529829603744567", - variables: { "postID": postid } + doc_id: "7074652575968011", + variables: { + "postID": postid, + "__relay_internal__pv__BarcelonaIsLoggedInrelayprovider": false, + "__relay_internal__pv__BarcelonaIsOriginalPostPillEnabledrelayprovider": false, + "__relay_internal__pv__BarcelonaIsThreadContextHeaderEnabledrelayprovider": false, + "__relay_internal__pv__BarcelonaShouldShowFediverseM1Featuresrelayprovider": false, + "__relay_internal__pv__BarcelonaIsInlineReelsEnabledrelayprovider": false, + "__relay_internal__pv__BarcelonaUseCometVideoPlaybackEnginerelayprovider": false, + "__relay_internal__pv__BarcelonaOptionalCookiesEnabledrelayprovider": true, + "__relay_internal__pv__BarcelonaShouldShowFediverseM075Featuresrelayprovider": false + } }, function(data) { if (!data) { return done(null, false); } - var thread_items = data.data.data.containing_thread.thread_items; + var thread_items = data.data.data.edges[0].node.thread_items; + //let thread_items = data.data.data.containing_thread.thread_items; for (var _i = 0, thread_items_1 = thread_items; _i < thread_items_1.length; _i++) { var item = thread_items_1[_i]; if (item.post.pk === postid) { @@ -101587,9 +101675,10 @@ var $$IMU_EXPORT$$; // https://wallpapers.com/images/high/aesthetic-simple-bathroom-interior-design-kbvt8bek9oihslv6.webp // https://wallpapers.com/images/hd/aesthetic-simple-bathroom-interior-design-kbvt8bek9oihslv6.webp -- 1298x1920 // https://wallpapers.com/images/hd4/aesthetic-simple-bathroom-interior-design-kbvt8bek9oihslv6.jpg -- 3309x4896 + // https://wallpapers.com/images/file/aesthetic-simple-bathroom-interior-design-kbvt8bek9oihslv6.jpg -- 3309x4896 return src - .replace(/(\/images\/+hd4\/+[^/]+)\.webp(?:[?#].*)?$/, "$1.jpg") - .replace(/(\/images\/+)(?:thumb(?:nail)?|high|hd)\/+/, "$1hd4/"); + .replace(/(\/images\/+file\/+[^/]+)\.webp(?:[?#].*)?$/, "$1.jpg") + .replace(/(\/images\/+)(?:thumb(?:nail)?|high|hd4?)\/+/, "$1file/"); } if (domain === "images.kolonmall.com") { // thanks to f2005 on discord: @@ -102336,6 +102425,58 @@ var $$IMU_EXPORT$$; // https://i.daily.jp/horse/2016/12/14/Images/f_09750568.jpg return src.replace(/(\/Images\/+)([0-9]+\.[a-z]+)(?:[?#].*)?$/, "$1f_$2"); } + if (domain_nowww === "dr-johanna-budwig.de") { + // thanks to anonymous for reporting: + // https://www.dr-johanna-budwig.de/cdn/thumbnail/ef/33/9f/1604563448/dr-johanna-budwig_1_800x800.jpg + // https://www.dr-johanna-budwig.de/cdn/media/ef/33/9f/1604563448/dr-johanna-budwig_1.jpg + return src.replace(/(\/cdn\/+)thumbnail\/+(.*?)_[0-9]+x[0-9]+(\.[a-z]+)(?:[?#].*)?$/, "$1media/$2$3"); + } + if (domain_nowww === "otakurepublic.com") { + // thanks to anonymous for reporting: + // https://otakurepublic.com/media/binary/008/579/851/8579851.jpg.l_thumbnail.webp + // https://otakurepublic.com/media/binary/008/579/851/8579851.jpg + return src.replace(/(\/media\/+binary\/+.*?\.[a-z]+)\.[^/.]+\.webp(?:[?#].*)?$/, "$1"); + } + if (domain === "scout.wgimager.com") { + // thanks to anonymous for reporting: + // https://scout.wgimager.com/w_280/h_218/q_90/f_webp/https://static.wgplayground.com/9c4ff820045f60da93b33777fd8bc8ec/wgplayground/c2d948d1ead59940f7af2e9331c86867.jpg + // https://static.wgplayground.com/9c4ff820045f60da93b33777fd8bc8ec/wgplayground/c2d948d1ead59940f7af2e9331c86867.jpg + return src.replace(/^[a-z]+:\/\/[^/]+\/+(?:[whqf]_[^/]+\/+)+(https?:\/\/)/, "$1"); + } + if (domain_nowww === "trustnordisk.com") { + // thanks to anonymous for reporting: + // https://trustnordisk.com/fileadmin/_processed_/f/8/csm_Hovedstill_Mr._Freeman_Zentropa_Foto_Christian_Geisnaes__2000x1200__d8dd7379aa.jpg + // https://trustnordisk.com/fileadmin/user_upload/Hovedstill_Mr._Freeman_Zentropa_Foto_Christian_Geisnaes__2000x1200_.jpg + return src.replace(/(\/fileadmin\/+)_processed_\/+(?:[0-9a-f]\/+){2}csm_([^/]+)_[0-9a-f]+\./, "$1user_upload/$2."); + } + if (domain_nowww === "cinemacrush.com") { + // https://cinemacrush.com/assets/play.png + if (/\/assets\/+play\.png(?:[?#].*)?$/.test(src)) { + return { + url: src, + bad: "mask" + }; + } + // thanks to anonymous for reporting: + // https://cinemacrush.com/media/the-end-of-summer/w185/A6UFgNyH35qsIEiqIc6o2xmkRQa.jpg + // https://cinemacrush.com/media/the-end-of-summer/original/A6UFgNyH35qsIEiqIc6o2xmkRQa.jpg + return src.replace(/(\/media\/+[^/]+\/+)[wh][0-9]+\/+/, "$1original/"); + } + if (domain_nowww === "characterai.io") { + // https://characterai.io/i/80/static/avatars/uploaded/2022/10/6/igor/socrates.webp?webp=true&anim=0 + // https://characterai.io/i/200/static/avatars/uploaded/2022/10/6/igor/socrates.webp?webp=true&anim=0 + newsrc = src.replace(/\/i\/+80\/+/, "/i/200/"); + if (newsrc !== src) + return newsrc; + if (!/\/static\/+avatars\/+uploaded\//.test(src)) { + // thanks to anonymous for reporting: + // https://characterai.io/i/80/static/avatars/TextAdventure3.png?webp=true&anim=0 + // https://characterai.io/static/avatars/TextAdventure3.png + // doesn't work for all: + // https://characterai.io/i/80/static/avatars/uploaded/2022/10/6/igor/socrates.webp?webp=true&anim=0 + return src.replace(/\/i\/+[0-9]+\/+static\/+(.*?)(?:[?#].*)?$/, "/static/$1"); + } + } // -- 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