From dfea9a250dcc9cc4ee6d1c214ad3ad9b12f4f5be Mon Sep 17 00:00:00 2001 From: qsniyg Date: Tue, 6 Feb 2024 09:07:50 +0000 Subject: [PATCH] Support chanel.com (fixes #917) --- CHANGELOG.txt | 6 ++++++ src/userscript.ts | 7 +++++++ userscript.user.js | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6557a206..01da57a1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,9 @@ +2024.2.1 (in-dev) + +Special thanks to rEnr3n for their contributions and reports for this release + +--- + 2024.2.0 New features: diff --git a/src/userscript.ts b/src/userscript.ts index 4e998f33..8fd9997c 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -29047,6 +29047,13 @@ var $$IMU_EXPORT$$; "https://images.bridestory.com/image/upload/assets/$1.jpg"); } + if (domain_nowww === "chanel.com") { + // thanks to rEnr3n on github: https://github.com/qsniyg/maxurl/issues/917 + // https://www.chanel.com/images/q_auto,f_auto,fl_lossy,dpr_auto/w_1920/FSH-1632391810548-coconeige2021slideshowcampagnedesktop1.jpg + // https://www.chanel.com/images/c_limit/FSH-1632391810548-coconeige2021slideshowcampagnedesktop1.jpg + return src.replace(/(\/images\/+)(?:(?:q|fl?|dpr|w|h)_[^/]+\/+)+/, "$1c_limit/"); + } + if (domain === "cloudinary-cdn.ffm.to") { // thanks to anonymous for reporting: // https://cloudinary-cdn.ffm.to/s--Kf-wM-9c--/f_webp/https%3A%2F%2Fimagestore.ffm.to%2Flink%2F850d7beb9bc03aaf1b8f07ea22ca5bf5.png diff --git a/userscript.user.js b/userscript.user.js index bd4066d1..e14cbac0 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -26498,6 +26498,12 @@ var $$IMU_EXPORT$$; // https://images.bridestory.com/image/upload/assets/the-barracks-hotel_wedding_mixed-tables_day_lo-res-By6IX3isU.jpg -- 5600x3735 return src.replace(/^[a-z]+:\/\/[^/]+\/+images\/+.*?\/+assets\/+([^/]+)\/+[^/]+(?:[?#].*)?$/, "https://images.bridestory.com/image/upload/assets/$1.jpg"); } + if (domain_nowww === "chanel.com") { + // thanks to rEnr3n on github: https://github.com/qsniyg/maxurl/issues/917 + // https://www.chanel.com/images/q_auto,f_auto,fl_lossy,dpr_auto/w_1920/FSH-1632391810548-coconeige2021slideshowcampagnedesktop1.jpg + // https://www.chanel.com/images/c_limit/FSH-1632391810548-coconeige2021slideshowcampagnedesktop1.jpg + return src.replace(/(\/images\/+)(?:(?:q|fl?|dpr|w|h)_[^/]+\/+)+/, "$1c_limit/"); + } if (domain === "cloudinary-cdn.ffm.to") { // thanks to anonymous for reporting: // https://cloudinary-cdn.ffm.to/s--Kf-wM-9c--/f_webp/https%3A%2F%2Fimagestore.ffm.to%2Flink%2F850d7beb9bc03aaf1b8f07ea22ca5bf5.png