diff --git a/src/userscript.ts b/src/userscript.ts index cafaeae0..386a72d5 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -13783,6 +13783,7 @@ var $$IMU_EXPORT$$; tumblr_api_key: base64_decode("IHhyTXBMTThuMWVDZUwzb1JZU1pHN0NMQUx3NkVIaFlEZFU2V3E1ZUQxUGJNa2xkN1kx").substr(1), // thanks to modelfe on github for the idea: https://github.com/qsniyg/maxurl/issues/639 twitter_use_ext: false, + youtube_replace_n: false, // thanks to LukasThyWalls on github for the idea: https://github.com/qsniyg/maxurl/issues/75 bigimage_blacklist: "", bigimage_blacklist_mode: "blacklist", @@ -17034,6 +17035,16 @@ var $$IMU_EXPORT$$; subcategory: "rule_specific", onupdate: update_rule_setting }, + youtube_replace_n: { + name: "YouTube: Enable faster speeds", + description: "Increases the download bandwidth for YouTube videos by replacing the `n` parameter. Note that this executes untrusted Javascript.", + warning: { + "true": "Untrusted Javascript code will be run on your browser by enabling this option." + }, + category: "rules", + subcategory: "rule_specific", + onupdate: update_rule_setting + }, bigimage_blacklist: { name: "Media blacklist", description: "A list of URLs (one per line) that are blacklisted from being processed", @@ -28988,6 +28999,10 @@ var $$IMU_EXPORT$$; // https://c.static-nike.com/a/images/w_1536,c_limit,f_auto/rdjukugxuljyne9f551j/kyrie-5-pineapple-house-release-date.png // https://c.static-nike.com/a/images/rdjukugxuljyne9f551j/kyrie-5-pineapple-house-release-date.png domain === "c.static-nike.com" || + // thanks to anonymous for reporting: + // https://resources.mynewsdesk.com/image/upload/ar_16:9,c_fill,dpr_auto,f_auto,g_auto,q_auto:good,w_746/lr6uyrf6pnefauywylkq + // https://resources.mynewsdesk.com/image/upload/ar_16:9,c_fill,dpr_auto,f_auto,g_auto,q_auto:good,w_746/lr6uyrf6pnefauywylkq + domain === "resources.mynewsdesk.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 @@ -31026,6 +31041,46 @@ var $$IMU_EXPORT$$; } }; + var get_n_replacer = function(cb) { + if (!options.rule_specific.youtube_replace_n) { + console_warn("Youtube n replacing is disabled, expect slow speeds."); + return cb(null); + } + + api_cache.fetch("youtube:n_replacer", cb, function(done) { + common_functions["youtube_fetch_asset"](api_cache, options, videoid, "js", function(asset) { + let match = asset.match(/b=([a-zA-Z0-9]{3})\[0\]\(b\),a\.set\("n",b\)/); + if (!match) { + console_error("Unable to find n match in", {asset}); + return done(null, 6*60*60); + } + + let match2 = asset.match(new RegExp("var " + match[1] + "=\\[([a-zA-Z0-9]{3})\\]")); + if (!match2) { + console_error("Unable to find n sub-match in", {asset, match}); + return done(null, 6*60*60); + } + + let match3 = asset.match(new RegExp("\n" + match2[1] + "=function\\(a\\){([\\s\\S]*?join\\(\"\"\\);?)};\n")); + if (!match3) { + console_error("Unable to find n function match in" {asset, match, match2}); + return done(null, 6*60*60); + } + + return done(new Function(["a"], match3[1]), 60*60); + }); + }); + }; + + var replace_n = function(n, cb) { + get_n_replacer(function(replacer) { + if (!replacer) + return cb(n); + + cb(replacer(n)); + }); + }; + if (player_response.streamingData) { if (player_response.streamingData.formats) { add_formats(player_response.streamingData.formats, false); @@ -31187,7 +31242,22 @@ var $$IMU_EXPORT$$; } common_functions["process_formats"](api_cache, options, available_formats, function() { - final(maxobj); + get_n_replacer(function(replacer) { + if (replacer) { + for (let format of available_formats) { + if (!format.url) + continue; + + if (/[?&]n=/.test(format.url)) { + format.url = format.url.replace(/([?&]n=)([^&#]+)/, function(_, pre, n) { + return pre + replacer(n) + }); + } + } + } + + return final(maxobj); + }); }); }; @@ -32108,6 +32178,9 @@ var $$IMU_EXPORT$$; // https://ca.hellomagazine.com/imagenes/healthandbeauty/201210249802/get-the-bond-girl-body/0-49-79/naomie-harris-1--a.jpg?interpolation=lanczos-normal&downsize=200px:*&output-format=progressive-jpeg // https://ca.hellomagazine.com/images/stories/0/2016/09/02/000/383/648/gallery_3_5.jpg?interpolation=lanczos-normal&downsize=0.75xw:* (domain_nosub === "hellomagazine.com" && (string_indexof(src, "/imagenes/") >= 0 || string_indexof(src, "/images/") >= 0)) || + // thanks to anonymous for reporting: + // https://images.hellomagazine.com/horizon/portrait/1935e1050422-gettyimages-2074321118.jpg?tx=c_limit,w_640 + domain === "images.hellomagazine.com" || // https://i0.1616.ro/media/521/2861/35030/17944527/1/jennifer-lawrence.jpg?width=160 (domain_nosub === "1616.ro" && domain.match(/^i[0-9]*\./)) || // http://images.lifeandstylemag.com/uploads/posts/image/35601/paula-patton-spirit-awards.jpg?crop=top&fit=clip&h=500&w=698 @@ -32756,6 +32829,9 @@ var $$IMU_EXPORT$$; // https://images.daznservices.com/di/library/DAZN_News/77/15/max-verstappen-red-bull-racing-gp-miami-2023-7-mayo-2023-f1_1ma5pdxghb98z1hxevs66jyen7.jpg?t=-48570153&w=800 // https://images.daznservices.com/di/library/DAZN_News/77/15/max-verstappen-red-bull-racing-gp-miami-2023-7-mayo-2023-f1_1ma5pdxghb98z1hxevs66jyen7.jpg (domain === "images.daznservices.com" &&/\/di\/+library\//.test(src)) || + // thanks to anonymous for reporting: + // https://thetv.jp/i/tl/200/0062/2000062723/8223_r.jpg?w=200&h=547 + domain_nowww === "thetv.jp" || // 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\//) || @@ -38302,6 +38378,10 @@ var $$IMU_EXPORT$$; // https://partners.spigen.com/cdn/shop/products/title_ipad_pro_11_2020_rugged_armor_pro_02_175x.progressive.jpg?v=1659056452 // https://partners.spigen.com/cdn/shop/products/title_ipad_pro_11_2020_rugged_armor_pro_02.jpg?v=1659056452 domain === "partners.spigen.com" || + // thanks to anonymous for reporting: + // https://cosmicbackground.io/cdn/shop/articles/hunt_banner.jpg?v=1661104358&width=100 + // https://cosmicbackground.io/cdn/shop/articles/hunt_banner.jpg?v=1661104358 + domain_nowww === "cosmicbackground.io" || // thanks to jonestly on discord: // https://www.roguewavecoffee.ca/cdn/shop/products/zp6dark_532x532.png?v=1670808549 domain_nowww === "roguewavecoffee.ca") && /\/cdn\/+shop\//.test(src)) || @@ -48395,6 +48475,10 @@ var $$IMU_EXPORT$$; // https://libreriaeldesvan.com/56423-large_default/1984-george-orwell.jpg // https://libreriaeldesvan.com/56423/1984-george-orwell.jpg domain_nowww === "libreriaeldesvan.com" || + // thanks to anonymous for reporting: + // https://www.fortunapost.com/60789-home_default/carte-postale-ancienne-carte-postale-fantaisie-illustrateur-guillaume-timbre-1-centime-illusions-perdues.jpg + // https://www.fortunapost.com/60789/carte-postale-ancienne-carte-postale-fantaisie-illustrateur-guillaume-timbre-1-centime-illusions-perdues.jpg + 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") { @@ -77285,6 +77369,14 @@ var $$IMU_EXPORT$$; .replace(/(\/image\/+ab6761610000)f178/, "$15174"); } + if (domain === "mosaic.scdn.co") { + // thanks to anonymous for reporting: + // https://mosaic.scdn.co/60/ab67616d00001e022ee1ed1528255b32d4593571ab67616d00001e023c3acd23605ccd1a9fd038bdab67616d00001e024277da4c011dcc87f012bbabab67616d00001e02ac89ab9bfbeaebb9ded4ceba + // https://mosaic.scdn.co/300/ab67616d00001e022ee1ed1528255b32d4593571ab67616d00001e023c3acd23605ccd1a9fd038bdab67616d00001e024277da4c011dcc87f012bbabab67616d00001e02ac89ab9bfbeaebb9ded4ceba + // https://mosaic.scdn.co/640/ab67616d00001e022ee1ed1528255b32d4593571ab67616d00001e023c3acd23605ccd1a9fd038bdab67616d00001e024277da4c011dcc87f012bbabab67616d00001e02ac89ab9bfbeaebb9ded4ceba + return src.replace(/(:\/\/[^/]+\/+)(?:300|60)\/+/, "$1640/"); + } + if (domain === "s.mxmcdn.net") { // https://s.mxmcdn.net/images-storage/albums4/2/6/6/9/6/7/36769662_500_500.jpg // https://s.mxmcdn.net/images-storage/albums4/2/6/6/9/6/7/36769662_800_800.jpg @@ -110725,9 +110817,11 @@ var $$IMU_EXPORT$$; // thanks to anonymous for reporting: // https://20.img.avito.st/640x480/8548299620.jpg // https://20.img.avito.st/1280x960/8548299620.jpg + // https://03.img.avito.st/432x324/5486224803.jpg + // https://03.img.avito.st/1280x960/5486224803.jpg // other: // https://94.img.avito.st/image/1/r8HEUra_Ayiy9_EulmSDtlzxBSJ6MQfadvEBLnz3AShwtw - return src.replace(/\/640x480\/+/, "/1280x960/"); + return src.replace(/\/(?:432x324|640x480)\/+/, "/1280x960/"); } if (domain_nowww === "ugra.ru") { @@ -112716,6 +112810,87 @@ var $$IMU_EXPORT$$; .replace(/(\/gallery\/+(?:[0-9]+\/+)+[0-9]+-)300\./, "$1800."); } + if (domain_nowww === "itemimg.com") { + // thanks to anonymous for reporting: + // https://itemimg.com/i/283569783.0.208x208.jpg + // https://itemimg.com/i/283569783.0.jpg + return src.replace(/(\/i\/+[0-9]+\.[0-9]+)\.[0-9]+x[0-9]+\./, "$1."); + } + + if (domain_nosub === "wbbasket.ru") { + // thanks to anonymous for reporting: + // https://basket-03.wbbasket.ru/vol368/part36873/36873970/images/tm/3.jpg + // https://basket-03.wbbasket.ru/vol368/part36873/36873970/images/c246x328/3.jpg + // https://basket-03.wbbasket.ru/vol368/part36873/36873970/images/big/3.jpg + return src.replace(/(\/images\/+)(?:c[0-9]+x[0-9]+|tm)\/+/, "$1big/"); + } + + if (domain === "pressi.universalmusic.fi") { + // thanks to anonymous for reporting: + // https://pressi.universalmusic.fi/kuvat/Kotimainen/ARPPA/ARPPA.B%C3%84NDI.VALERIA.ByAndre_pressi.jpg?img=img2048 + // https://pressi.universalmusic.fi/kuvat/Kotimainen/ARPPA/ARPPA.B%C3%84NDI.VALERIA.ByAndre_pressi.jpg?img=full -- 2835x2268 + return src.replace(/([?&]img=)[^&#]+/, "$1full"); + } + + if (domain_nosub === "kuvat.fi" && /^ts[0-9]*\./.test(domain)) { + // thanks to anonymous for reporting: + // https://pressi.universalmusic.fi/kuvat/Ulkomainen/Ariana+Grande/Ariana+Grande+-+Album+2+-+Credit+Katia+Temkin.jpg + // https://ts2.kuvat.fi/tt/?size=thumb560nocrop.webp&hash=...&d=pressi.universalmusic.fi&f=%2Fkuvat%2FUlkomainen%2FAriana%2520Grande%2FAriana%2520Grande%2520-%2520Album%25202%2520-%2520Credit%2520Katia%2520Temkin.jpg&key=... + // https://pressi.universalmusic.fi//kuvat/Ulkomainen/Ariana%20Grande/Ariana%20Grande%20-%20Album%202%20-%20Credit%20Katia%20Temkin.jpg?img=full + // https://ts1.kuvat.fi/tt/?size=thumb560nocrop.webp&hash=...&d=pressi.universalmusic.fi&f=%2Fkuvat%2FUlkomainen%2FHAILEE%2520STEINFELD%2F200309_SM_HS_I_LOVE_YOUS_0327_re_pressi.jpg&key=... + // todo: download links + if (/\/tt\/+\?/.test(src)) { + let queries = get_queries(src); + if (queries["d"] === "pressi.universalmusic.fi" && queries["f"]) { + return "https://pressi.universalmusic.fi/" + decodeURIComponent(queries["f"]).replace(/^\/+/, "") + "?img=full"; + } + } + } + + if (domain_nosub === "d-cd.net") { + // thanks to anonymous for reporting: + // https://a.d-cd.net/U4J7fT15K2vDgCCmtnatb6cnz-Y-1280.jpg + // https://a.d-cd.net/U4J7fT15K2vDgCCmtnatb6cnz-Y-1920.jpg + // https://a.d-cd.net/Ulpm3rSOsxIQbfDGA2GbYAsiMH4-100.jpg + // https://a.d-cd.net/Ulpm3rSOsxIQbfDGA2GbYAsiMH4-200.jpg + // https://a.d-cd.net/yBggzNJjBsKl09ml9LqCJC6B0jM-240.jpg + // https://a.d-cd.net/yBggzNJjBsKl09ml9LqCJC6B0jM-1920.jpg + return src + .replace(/(:\/\/[^/]+\/+[^/]+)-100\./, "$1-200.") + .replace(/(:\/\/[^/]+\/+[^/]+)-(?:240|480|960|1280)\./, "$1-1920."); + } + + if (domain === "static.auction.ru") { + // thanks to anonymous for reporting: + // https://static.auction.ru/offer_images/rd48/2021/06/15/03/small/J/Ju6TyTYOqiq/shakhmaty_dorozhnye_maljutka_komplekt_gruzija_sssr.jpg + // https://static.auction.ru/offer_images/rd48/2021/06/15/03/big/J/Ju6TyTYOqiq/shakhmaty_dorozhnye_maljutka_komplekt_gruzija_sssr.jpg + newsrc = src.replace(/(\/offer_images\/+[^/]+\/+[0-9]{4}\/+[0-9]{2}\/+[0-9]{2}\/+[0-9]+\/+)small\/+/, "$1big/"); + if (newsrc !== src) { + return { + url: newsrc, + problems: {watermark: true} + } + } + } + + if (domain === "collectionimages.npg.org.uk") { + // https://collectionimages.npg.org.uk/std/mw251176/Pet-Shop-Boys-Chris-Lowe-Neil-Tennant.jpg + // https://collectionimages.npg.org.uk/popover/mw251176/Pet-Shop-Boys-Chris-Lowe-Neil-Tennant.jpg -- 427x430 + // https://collectionimages.npg.org.uk/large/mw251176/Pet-Shop-Boys-Chris-Lowe-Neil-Tennant.jpg + // https://collectionimages.npg.org.uk/long/mw251176/Pet-Shop-Boys-Chris-Lowe-Neil-Tennant.jpg + return src.replace(/(:\/\/[^/]+\/+)(?:std|large|popover)\/+/, "$1long/"); + } + + if (domain === "pictime7eus1public-m.azureedge.net" || + // https://pictimecloudaf-m.azureedge.net/pictures/15/26/15026606/thumbres/899471260.jpg + domain === "pictimecloudaf-m.azureedge.net") { + // thanks to anonymous for reporting: + // https://pictime7eus1public-m.azureedge.net/pictures/36/533/36533274/mz1dgy669ac7/thumbres/9068224570.jpg + // https://pictime7eus1public-m.azureedge.net/pictures/36/533/36533274/mz1dgy669ac7/smallres/9068224570.jpg + // https://pictime7eus1public-m.azureedge.net/pictures/36/533/36533274/mz1dgy669ac7/lowres/9068224570.jpg + return src.replace(/(\/pictures\/+[0-9]+\/+[0-9]+\/+[0-9]+\/+[0-9a-z]+\/+)(?:thumb|small)res\/+/, "$1lowres/"); + } + @@ -115788,6 +115963,26 @@ var $$IMU_EXPORT$$; } } + if (host_domain === "open.spotify.com") { + // thanks to anonymous for reporting: + // public lists on spotify user profiles + return { + element_ok: function(el) { + if (el.getAttribute("data-testid") === "card-click-handler") { + let prev = el.previousElementSibling; + if (prev) + prev = prev.previousElementSibling; + if (prev && prev.tagName === "DIV") { + return { + el: prev, + search: true + }; + } + } + } + } + } + return null; }; @@ -115996,6 +116191,7 @@ var $$IMU_EXPORT$$; "tiktok_thirdparty": true, "tumblr_api_key": true, "twitter_use_ext": true, + "youtube_replace_n": true, "mouseover_linked_image": "linked_image" }; diff --git a/userscript.user.js b/userscript.user.js index be025b84..8509093e 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -13039,6 +13039,7 @@ var $$IMU_EXPORT$$; tumblr_api_key: base64_decode("IHhyTXBMTThuMWVDZUwzb1JZU1pHN0NMQUx3NkVIaFlEZFU2V3E1ZUQxUGJNa2xkN1kx").substr(1), // thanks to modelfe on github for the idea: https://github.com/qsniyg/maxurl/issues/639 twitter_use_ext: false, + youtube_replace_n: false, // thanks to LukasThyWalls on github for the idea: https://github.com/qsniyg/maxurl/issues/75 bigimage_blacklist: "", bigimage_blacklist_mode: "blacklist", @@ -16249,6 +16250,16 @@ var $$IMU_EXPORT$$; subcategory: "rule_specific", onupdate: update_rule_setting }, + youtube_replace_n: { + name: "YouTube: Enable faster speeds", + description: "Increases the download bandwidth for YouTube videos by replacing the `n` parameter. Note that this executes untrusted Javascript.", + warning: { + "true": "Untrusted Javascript code will be run on your browser by enabling this option." + }, + category: "rules", + subcategory: "rule_specific", + onupdate: update_rule_setting + }, bigimage_blacklist: { name: "Media blacklist", description: "A list of URLs (one per line) that are blacklisted from being processed", @@ -26448,6 +26459,10 @@ var $$IMU_EXPORT$$; // https://c.static-nike.com/a/images/w_1536,c_limit,f_auto/rdjukugxuljyne9f551j/kyrie-5-pineapple-house-release-date.png // https://c.static-nike.com/a/images/rdjukugxuljyne9f551j/kyrie-5-pineapple-house-release-date.png domain === "c.static-nike.com" || + // thanks to anonymous for reporting: + // https://resources.mynewsdesk.com/image/upload/ar_16:9,c_fill,dpr_auto,f_auto,g_auto,q_auto:good,w_746/lr6uyrf6pnefauywylkq + // https://resources.mynewsdesk.com/image/upload/ar_16:9,c_fill,dpr_auto,f_auto,g_auto,q_auto:good,w_746/lr6uyrf6pnefauywylkq + domain === "resources.mynewsdesk.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 @@ -28273,6 +28288,39 @@ var $$IMU_EXPORT$$; } } }; + var get_n_replacer = function(cb) { + if (!options.rule_specific.youtube_replace_n) { + console_warn("Youtube n replacing is disabled, expect slow speeds."); + return cb(null); + } + api_cache.fetch("youtube:n_replacer", cb, function(done) { + common_functions["youtube_fetch_asset"](api_cache, options, videoid, "js", function(asset) { + var match = asset.match(/b=([a-zA-Z0-9]{3})\[0\]\(b\),a\.set\("n",b\)/); + if (!match) { + console_error("Unable to find n match in", { asset: asset }); + return done(null, 6 * 60 * 60); + } + var match2 = asset.match(new RegExp("var " + match[1] + "=\\[([a-zA-Z0-9]{3})\\]")); + if (!match2) { + console_error("Unable to find n sub-match in", { asset: asset, match: match }); + return done(null, 6 * 60 * 60); + } + var match3 = asset.match(new RegExp("\n" + match2[1] + "=function\\(a\\){([\\s\\S]*?join\\(\"\"\\);?)};\n")); + if (!match3) { + console_error("Unable to find n function match in", { asset: asset, match: match, match2: match2 }); + return done(null, 6 * 60 * 60); + } + return done(new Function(["a"], match3[1]), 60 * 60); + }); + }); + }; + var replace_n = function(n, cb) { + get_n_replacer(function(replacer) { + if (!replacer) + return cb(n); + cb(replacer(n)); + }); + }; if (player_response.streamingData) { if (player_response.streamingData.formats) { add_formats(player_response.streamingData.formats, false); @@ -28407,7 +28455,21 @@ var $$IMU_EXPORT$$; return final( /*maxobj*/); } common_functions["process_formats"](api_cache, options, available_formats, function() { - final(maxobj); + get_n_replacer(function(replacer) { + if (replacer) { + for (var _i = 0, available_formats_1 = available_formats; _i < available_formats_1.length; _i++) { + var format = available_formats_1[_i]; + if (!format.url) + continue; + if (/[?&]n=/.test(format.url)) { + format.url = format.url.replace(/([?&]n=)([^&#]+)/, function(_, pre, n) { + return pre + replacer(n); + }); + } + } + } + return final(maxobj); + }); }); }; common_functions["youtube_fetch_embed"](api_cache, options, id, function(data) { @@ -29288,6 +29350,9 @@ var $$IMU_EXPORT$$; // https://ca.hellomagazine.com/imagenes/healthandbeauty/201210249802/get-the-bond-girl-body/0-49-79/naomie-harris-1--a.jpg?interpolation=lanczos-normal&downsize=200px:*&output-format=progressive-jpeg // https://ca.hellomagazine.com/images/stories/0/2016/09/02/000/383/648/gallery_3_5.jpg?interpolation=lanczos-normal&downsize=0.75xw:* (domain_nosub === "hellomagazine.com" && (string_indexof(src, "/imagenes/") >= 0 || string_indexof(src, "/images/") >= 0)) || + // thanks to anonymous for reporting: + // https://images.hellomagazine.com/horizon/portrait/1935e1050422-gettyimages-2074321118.jpg?tx=c_limit,w_640 + domain === "images.hellomagazine.com" || // https://i0.1616.ro/media/521/2861/35030/17944527/1/jennifer-lawrence.jpg?width=160 (domain_nosub === "1616.ro" && domain.match(/^i[0-9]*\./)) || // http://images.lifeandstylemag.com/uploads/posts/image/35601/paula-patton-spirit-awards.jpg?crop=top&fit=clip&h=500&w=698 @@ -29936,6 +30001,9 @@ var $$IMU_EXPORT$$; // https://images.daznservices.com/di/library/DAZN_News/77/15/max-verstappen-red-bull-racing-gp-miami-2023-7-mayo-2023-f1_1ma5pdxghb98z1hxevs66jyen7.jpg?t=-48570153&w=800 // https://images.daznservices.com/di/library/DAZN_News/77/15/max-verstappen-red-bull-racing-gp-miami-2023-7-mayo-2023-f1_1ma5pdxghb98z1hxevs66jyen7.jpg (domain === "images.daznservices.com" && /\/di\/+library\//.test(src)) || + // thanks to anonymous for reporting: + // https://thetv.jp/i/tl/200/0062/2000062723/8223_r.jpg?w=200&h=547 + domain_nowww === "thetv.jp" || // 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\//) || @@ -35033,6 +35101,10 @@ var $$IMU_EXPORT$$; // https://partners.spigen.com/cdn/shop/products/title_ipad_pro_11_2020_rugged_armor_pro_02_175x.progressive.jpg?v=1659056452 // https://partners.spigen.com/cdn/shop/products/title_ipad_pro_11_2020_rugged_armor_pro_02.jpg?v=1659056452 domain === "partners.spigen.com" || + // thanks to anonymous for reporting: + // https://cosmicbackground.io/cdn/shop/articles/hunt_banner.jpg?v=1661104358&width=100 + // https://cosmicbackground.io/cdn/shop/articles/hunt_banner.jpg?v=1661104358 + domain_nowww === "cosmicbackground.io" || // thanks to jonestly on discord: // https://www.roguewavecoffee.ca/cdn/shop/products/zp6dark_532x532.png?v=1670808549 domain_nowww === "roguewavecoffee.ca") && /\/cdn\/+shop\//.test(src)) || @@ -44180,6 +44252,10 @@ var $$IMU_EXPORT$$; // https://libreriaeldesvan.com/56423-large_default/1984-george-orwell.jpg // https://libreriaeldesvan.com/56423/1984-george-orwell.jpg domain_nowww === "libreriaeldesvan.com" || + // thanks to anonymous for reporting: + // https://www.fortunapost.com/60789-home_default/carte-postale-ancienne-carte-postale-fantaisie-illustrateur-guillaume-timbre-1-centime-illusions-perdues.jpg + // https://www.fortunapost.com/60789/carte-postale-ancienne-carte-postale-fantaisie-illustrateur-guillaume-timbre-1-centime-illusions-perdues.jpg + 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") { @@ -69807,6 +69883,13 @@ var $$IMU_EXPORT$$; .replace(/(\/image\/+ab6761610000)5174/, "$1e5eb") .replace(/(\/image\/+ab6761610000)f178/, "$15174"); } + if (domain === "mosaic.scdn.co") { + // thanks to anonymous for reporting: + // https://mosaic.scdn.co/60/ab67616d00001e022ee1ed1528255b32d4593571ab67616d00001e023c3acd23605ccd1a9fd038bdab67616d00001e024277da4c011dcc87f012bbabab67616d00001e02ac89ab9bfbeaebb9ded4ceba + // https://mosaic.scdn.co/300/ab67616d00001e022ee1ed1528255b32d4593571ab67616d00001e023c3acd23605ccd1a9fd038bdab67616d00001e024277da4c011dcc87f012bbabab67616d00001e02ac89ab9bfbeaebb9ded4ceba + // https://mosaic.scdn.co/640/ab67616d00001e022ee1ed1528255b32d4593571ab67616d00001e023c3acd23605ccd1a9fd038bdab67616d00001e024277da4c011dcc87f012bbabab67616d00001e02ac89ab9bfbeaebb9ded4ceba + return src.replace(/(:\/\/[^/]+\/+)(?:300|60)\/+/, "$1640/"); + } if (domain === "s.mxmcdn.net") { // https://s.mxmcdn.net/images-storage/albums4/2/6/6/9/6/7/36769662_500_500.jpg // https://s.mxmcdn.net/images-storage/albums4/2/6/6/9/6/7/36769662_800_800.jpg @@ -99404,9 +99487,11 @@ var $$IMU_EXPORT$$; // thanks to anonymous for reporting: // https://20.img.avito.st/640x480/8548299620.jpg // https://20.img.avito.st/1280x960/8548299620.jpg + // https://03.img.avito.st/432x324/5486224803.jpg + // https://03.img.avito.st/1280x960/5486224803.jpg // other: // https://94.img.avito.st/image/1/r8HEUra_Ayiy9_EulmSDtlzxBSJ6MQfadvEBLnz3AShwtw - return src.replace(/\/640x480\/+/, "/1280x960/"); + return src.replace(/\/(?:432x324|640x480)\/+/, "/1280x960/"); } if (domain_nowww === "ugra.ru") { // thanks to anonymous for reporting: @@ -101184,6 +101269,79 @@ var $$IMU_EXPORT$$; .replace(/(\/gallery\/+(?:[0-9]+\/+)+[0-9]+-800)\.webp(?:[?#].*)?/, "$1.jpg") .replace(/(\/gallery\/+(?:[0-9]+\/+)+[0-9]+-)300\./, "$1800."); } + if (domain_nowww === "itemimg.com") { + // thanks to anonymous for reporting: + // https://itemimg.com/i/283569783.0.208x208.jpg + // https://itemimg.com/i/283569783.0.jpg + return src.replace(/(\/i\/+[0-9]+\.[0-9]+)\.[0-9]+x[0-9]+\./, "$1."); + } + if (domain_nosub === "wbbasket.ru") { + // thanks to anonymous for reporting: + // https://basket-03.wbbasket.ru/vol368/part36873/36873970/images/tm/3.jpg + // https://basket-03.wbbasket.ru/vol368/part36873/36873970/images/c246x328/3.jpg + // https://basket-03.wbbasket.ru/vol368/part36873/36873970/images/big/3.jpg + return src.replace(/(\/images\/+)(?:c[0-9]+x[0-9]+|tm)\/+/, "$1big/"); + } + if (domain === "pressi.universalmusic.fi") { + // thanks to anonymous for reporting: + // https://pressi.universalmusic.fi/kuvat/Kotimainen/ARPPA/ARPPA.B%C3%84NDI.VALERIA.ByAndre_pressi.jpg?img=img2048 + // https://pressi.universalmusic.fi/kuvat/Kotimainen/ARPPA/ARPPA.B%C3%84NDI.VALERIA.ByAndre_pressi.jpg?img=full -- 2835x2268 + return src.replace(/([?&]img=)[^&#]+/, "$1full"); + } + if (domain_nosub === "kuvat.fi" && /^ts[0-9]*\./.test(domain)) { + // thanks to anonymous for reporting: + // https://pressi.universalmusic.fi/kuvat/Ulkomainen/Ariana+Grande/Ariana+Grande+-+Album+2+-+Credit+Katia+Temkin.jpg + // https://ts2.kuvat.fi/tt/?size=thumb560nocrop.webp&hash=...&d=pressi.universalmusic.fi&f=%2Fkuvat%2FUlkomainen%2FAriana%2520Grande%2FAriana%2520Grande%2520-%2520Album%25202%2520-%2520Credit%2520Katia%2520Temkin.jpg&key=... + // https://pressi.universalmusic.fi//kuvat/Ulkomainen/Ariana%20Grande/Ariana%20Grande%20-%20Album%202%20-%20Credit%20Katia%20Temkin.jpg?img=full + // https://ts1.kuvat.fi/tt/?size=thumb560nocrop.webp&hash=...&d=pressi.universalmusic.fi&f=%2Fkuvat%2FUlkomainen%2FHAILEE%2520STEINFELD%2F200309_SM_HS_I_LOVE_YOUS_0327_re_pressi.jpg&key=... + // todo: download links + if (/\/tt\/+\?/.test(src)) { + var queries_3 = get_queries(src); + if (queries_3["d"] === "pressi.universalmusic.fi" && queries_3["f"]) { + return "https://pressi.universalmusic.fi/" + decodeURIComponent(queries_3["f"]).replace(/^\/+/, "") + "?img=full"; + } + } + } + if (domain_nosub === "d-cd.net") { + // thanks to anonymous for reporting: + // https://a.d-cd.net/U4J7fT15K2vDgCCmtnatb6cnz-Y-1280.jpg + // https://a.d-cd.net/U4J7fT15K2vDgCCmtnatb6cnz-Y-1920.jpg + // https://a.d-cd.net/Ulpm3rSOsxIQbfDGA2GbYAsiMH4-100.jpg + // https://a.d-cd.net/Ulpm3rSOsxIQbfDGA2GbYAsiMH4-200.jpg + // https://a.d-cd.net/yBggzNJjBsKl09ml9LqCJC6B0jM-240.jpg + // https://a.d-cd.net/yBggzNJjBsKl09ml9LqCJC6B0jM-1920.jpg + return src + .replace(/(:\/\/[^/]+\/+[^/]+)-100\./, "$1-200.") + .replace(/(:\/\/[^/]+\/+[^/]+)-(?:240|480|960|1280)\./, "$1-1920."); + } + if (domain === "static.auction.ru") { + // thanks to anonymous for reporting: + // https://static.auction.ru/offer_images/rd48/2021/06/15/03/small/J/Ju6TyTYOqiq/shakhmaty_dorozhnye_maljutka_komplekt_gruzija_sssr.jpg + // https://static.auction.ru/offer_images/rd48/2021/06/15/03/big/J/Ju6TyTYOqiq/shakhmaty_dorozhnye_maljutka_komplekt_gruzija_sssr.jpg + newsrc = src.replace(/(\/offer_images\/+[^/]+\/+[0-9]{4}\/+[0-9]{2}\/+[0-9]{2}\/+[0-9]+\/+)small\/+/, "$1big/"); + if (newsrc !== src) { + return { + url: newsrc, + problems: { watermark: true } + }; + } + } + if (domain === "collectionimages.npg.org.uk") { + // https://collectionimages.npg.org.uk/std/mw251176/Pet-Shop-Boys-Chris-Lowe-Neil-Tennant.jpg + // https://collectionimages.npg.org.uk/popover/mw251176/Pet-Shop-Boys-Chris-Lowe-Neil-Tennant.jpg -- 427x430 + // https://collectionimages.npg.org.uk/large/mw251176/Pet-Shop-Boys-Chris-Lowe-Neil-Tennant.jpg + // https://collectionimages.npg.org.uk/long/mw251176/Pet-Shop-Boys-Chris-Lowe-Neil-Tennant.jpg + return src.replace(/(:\/\/[^/]+\/+)(?:std|large|popover)\/+/, "$1long/"); + } + if (domain === "pictime7eus1public-m.azureedge.net" || + // https://pictimecloudaf-m.azureedge.net/pictures/15/26/15026606/thumbres/899471260.jpg + domain === "pictimecloudaf-m.azureedge.net") { + // thanks to anonymous for reporting: + // https://pictime7eus1public-m.azureedge.net/pictures/36/533/36533274/mz1dgy669ac7/thumbres/9068224570.jpg + // https://pictime7eus1public-m.azureedge.net/pictures/36/533/36533274/mz1dgy669ac7/smallres/9068224570.jpg + // https://pictime7eus1public-m.azureedge.net/pictures/36/533/36533274/mz1dgy669ac7/lowres/9068224570.jpg + return src.replace(/(\/pictures\/+[0-9]+\/+[0-9]+\/+[0-9]+\/+[0-9a-z]+\/+)(?:thumb|small)res\/+/, "$1lowres/"); + } // -- 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 @@ -103762,6 +103920,25 @@ var $$IMU_EXPORT$$; } }; } + if (host_domain === "open.spotify.com") { + // thanks to anonymous for reporting: + // public lists on spotify user profiles + return { + element_ok: function(el) { + if (el.getAttribute("data-testid") === "card-click-handler") { + var prev = el.previousElementSibling; + if (prev) + prev = prev.previousElementSibling; + if (prev && prev.tagName === "DIV") { + return { + el: prev, + search: true + }; + } + } + } + }; + } return null; }; var _get_album_info_gallery = function(album_info, el, nextprev) { @@ -103934,6 +104111,7 @@ var $$IMU_EXPORT$$; "tiktok_thirdparty": true, "tumblr_api_key": true, "twitter_use_ext": true, + "youtube_replace_n": true, "mouseover_linked_image": "linked_image" }; for (var rule_specific in rule_specific_map) {