From 656b9fae64ccd93ef62eb935ad4ce2cec6feefbd Mon Sep 17 00:00:00 2001 From: qsniyg Date: Tue, 7 May 2024 20:06:05 +0000 Subject: [PATCH] More websites/rules (fixes #1312) --- src/userscript.ts | 24 ++++++++++++++++++++++-- userscript.user.js | 23 +++++++++++++++++++++-- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/userscript.ts b/src/userscript.ts index e269a05b..6d96cc21 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -32974,6 +32974,9 @@ var $$IMU_EXPORT$$; // thanks to anonymous for reporting: // https://www.savannahnow.com/gcdn/authoring/2006/05/27/NSMN/ghows-GA-436437d7-3af2-44b4-a743-3ff643329b91-de026424.jpeg?width=660&height=527&fit=crop&format=pjpg&auto=webp (domain_nowww === "savannahnow.com" && string_indexof(src, "/gcdn/") >= 0) || + // thanks to anonymous: + // https://cdn.leonardo.ai/users/b8083275-cc92-4166-b44f-7c73799e22fb/generations/f0d074d0-f8c5-4113-a465-8d472a3343b9/Default_2D_illustration_of_a_25yo_Supergirl_marathon_runner_sh_2.jpg?w=512 + (domain === "cdn.leonardo.ai" && /\/generations\//.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\//) || @@ -77822,10 +77825,16 @@ var $$IMU_EXPORT$$; return src.replace(/\/upload\/+thumb\/+[^/]*\/+images\/+/, "/images/"); } - if (domain_nosub === "ozone.ru" && domain.match(/^cdn[0-9]*\./)) { + if (domain_nosub === "ozone.ru" && /^(?:cdn[0-9]*|ir(?:-[0-9]+)?)\./.test(domain)) { // https://cdn1.ozone.ru/multimedia/c1200/1022042796.jpg // https://cdn1.ozone.ru/multimedia/1022042796.jpg - return src.replace(/\/multimedia\/+c[0-9]+\/+/, "/multimedia/"); + // thanks to anonymous for reporting: + // https://ir.ozone.ru/s3/multimedia-1-y/wc200/7016992726.jpg + // https://ir.ozone.ru/s3/multimedia-1-y/wc1000/7016992726.jpg + // https://ir.ozone.ru/s3/multimedia-1-y/7016992726.jpg + // https://ir-2.ozone.ru/s3/multimedia-1-y/wc200/7016992726.jpg + // https://ir-2.ozone.ru/s3/multimedia-1-y/7016992726.jpg + return src.replace(/(\/multimedia(?:-[^/]+)?\/+)w?c[0-9]+\/+/, "$1"); } if (domain === "img.tsn.ua") { @@ -113902,6 +113911,17 @@ var $$IMU_EXPORT$$; return src.replace(/(\/cover\/+ld\/+[0-9]+-[0-9]+\/+)thumb\/+/, "$1"); } + if (domain === "img.dlsite.jp") { + // thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1312 + // https://img.dlsite.jp/resize/images2/work/books/BJ617000/BJ616372_img_main_240x240.jpg + // https://img.dlsite.jp/modpub/images2/work/books/BJ617000/BJ616372_img_main.jpg + // https://img.dlsite.jp/modpub/images2/work/doujin/RJ438000/RJ437590_img_smp4.webp + // https://img.dlsite.jp/modpub/images2/work/doujin/RJ438000/RJ437590_img_smp4.jpg + return src + .replace(/(\/modpub\/.*)\.webp(?:[?#].*)?$/, "$1.jpg") + .replace(/\/resize\/+(.*?)_[0-9]+x[0-9]+(\.[a-z]+)(?:[?#].*)?$/, "/modpub/$1$2"); + } + diff --git a/userscript.user.js b/userscript.user.js index 229f1441..96111988 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -30133,6 +30133,9 @@ var $$IMU_EXPORT$$; // thanks to anonymous for reporting: // https://www.savannahnow.com/gcdn/authoring/2006/05/27/NSMN/ghows-GA-436437d7-3af2-44b4-a743-3ff643329b91-de026424.jpeg?width=660&height=527&fit=crop&format=pjpg&auto=webp (domain_nowww === "savannahnow.com" && string_indexof(src, "/gcdn/") >= 0) || + // thanks to anonymous: + // https://cdn.leonardo.ai/users/b8083275-cc92-4166-b44f-7c73799e22fb/generations/f0d074d0-f8c5-4113-a465-8d472a3343b9/Default_2D_illustration_of_a_25yo_Supergirl_marathon_runner_sh_2.jpg?w=512 + (domain === "cdn.leonardo.ai" && /\/generations\//.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\//) || @@ -70292,10 +70295,16 @@ var $$IMU_EXPORT$$; // http://www.europaplus.ru/images/news/Untitled-1_1355402814.jpg return src.replace(/\/upload\/+thumb\/+[^/]*\/+images\/+/, "/images/"); } - if (domain_nosub === "ozone.ru" && domain.match(/^cdn[0-9]*\./)) { + if (domain_nosub === "ozone.ru" && /^(?:cdn[0-9]*|ir(?:-[0-9]+)?)\./.test(domain)) { // https://cdn1.ozone.ru/multimedia/c1200/1022042796.jpg // https://cdn1.ozone.ru/multimedia/1022042796.jpg - return src.replace(/\/multimedia\/+c[0-9]+\/+/, "/multimedia/"); + // thanks to anonymous for reporting: + // https://ir.ozone.ru/s3/multimedia-1-y/wc200/7016992726.jpg + // https://ir.ozone.ru/s3/multimedia-1-y/wc1000/7016992726.jpg + // https://ir.ozone.ru/s3/multimedia-1-y/7016992726.jpg + // https://ir-2.ozone.ru/s3/multimedia-1-y/wc200/7016992726.jpg + // https://ir-2.ozone.ru/s3/multimedia-1-y/7016992726.jpg + return src.replace(/(\/multimedia(?:-[^/]+)?\/+)w?c[0-9]+\/+/, "$1"); } if (domain === "img.tsn.ua") { // https://img.tsn.ua/cached/1518092914/tsn-65e5f602e5840498ead47d2707d23e52/thumbs/1200x630/22/f5/14124ef20c0b1e5cb6053275da87f522.jpg @@ -102261,6 +102270,16 @@ var $$IMU_EXPORT$$; // https://www.lddb.com/cover/ld/37501-37600/37544.jpg return src.replace(/(\/cover\/+ld\/+[0-9]+-[0-9]+\/+)thumb\/+/, "$1"); } + if (domain === "img.dlsite.jp") { + // thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1312 + // https://img.dlsite.jp/resize/images2/work/books/BJ617000/BJ616372_img_main_240x240.jpg + // https://img.dlsite.jp/modpub/images2/work/books/BJ617000/BJ616372_img_main.jpg + // https://img.dlsite.jp/modpub/images2/work/doujin/RJ438000/RJ437590_img_smp4.webp + // https://img.dlsite.jp/modpub/images2/work/doujin/RJ438000/RJ437590_img_smp4.jpg + return src + .replace(/(\/modpub\/.*)\.webp(?:[?#].*)?$/, "$1.jpg") + .replace(/\/resize\/+(.*?)_[0-9]+x[0-9]+(\.[a-z]+)(?:[?#].*)?$/, "/modpub/$1$2"); + } // -- general rules -- if (src.match(/\/ImageGen\.ashx\?/)) { // http://www.lookalikes.info/umbraco/ImageGen.ashx?image=/media/97522/nick%20hewer%20-%20mark%20brown.jpeg&width=250&constrain=true