Skip to content

Commit

Permalink
More websites/rules (fixes #1312)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed May 7, 2024
1 parent f2c6546 commit 656b9fa
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 4 deletions.
24 changes: 22 additions & 2 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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\//) ||
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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");
}




Expand Down
23 changes: 21 additions & 2 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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\//) ||
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 656b9fa

Please sign in to comment.