Skip to content

Commit

Permalink
Improve aladin rule (fixes #1344)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Jul 29, 2024
1 parent cc49dff commit 122101a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82335,7 +82335,10 @@ var $$IMU_EXPORT$$;
if (domain === "img.lemde.fr") {
// https://img.lemde.fr/2018/09/21/0/0/5203/3601/688/0/60/0/4fe60ea_5389858-01-06.jpg
// https://img.lemde.fr/2018/09/21/0/0/0/0/0/0/0/0/4fe60ea_5389858-01-06.jpg
return src.replace(/(:\/\/[^/]*\/[0-9]{4}\/+(?:[0-9]{2}\/+){2})(?:[0-9]+\/+){8}([0-9a-f]+_[0-9]+-[0-9]+-[0-9]+\.[^/.]*)(?:[?#].*)?$/,
// thanks to anonymous for reporting:
// https://img.lemde.fr/2023/04/12/434/0/2240/1493/1440/960/60/0/4252195_1681309483888-ifn-53140422-1.jpg
// https://img.lemde.fr/2023/04/12/0/0/0/0/0/0/0/0/4252195_1681309483888-ifn-53140422-1.jpg
return src.replace(/(:\/\/[^/]*\/[0-9]{4}\/+(?:[0-9]{2}\/+){2})(?:[0-9]+\/+){8}([0-9a-f]+_[0-9]+-[^/.?#]+\.[^/.]*)(?:[?#].*)?$/,
"$10/0/0/0/0/0/0/0/$2");
}

Expand Down Expand Up @@ -86753,9 +86756,16 @@ var $$IMU_EXPORT$$;
// https://image.aladin.co.kr/product/19928/0/cover500/k242635748_1.jpg -- 500x733
// https://image.aladin.co.kr/product/18004/88/cover150/k892534639_1.jpg
// https://image.aladin.co.kr/product/18004/88/cover500/k892534639_1.jpg
// thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1344
// https://image.aladin.co.kr/product/33894/48/cover100/k132930727_1.jpg
// https://image.aladin.co.kr/product/33894/48/cover200/k132930727_1.jpg
// https://image.aladin.co.kr/product/33894/48/cover500/k132930727_1.jpg
// https://image.aladin.co.kr/product/33894/48/letslook/k132930727_fl.jpg -- 2114x2433
// other:
// https://image.aladin.co.kr/product/17719/20/cover500/4800292263_1.jpg -- 1500x2112
return src.replace(/(\/product\/+[0-9]+\/+[0-9]+\/+)cover(?:sum|150)\/+/, "$1cover500/");
return src
.replace(/(\/product\/+[0-9]+\/+[0-9]+\/+)cover500\/+(k[0-9]+_)1\./, "$1letslook/$2fl.")
.replace(/(\/product\/+[0-9]+\/+[0-9]+\/+)cover(?:sum|1[50]0|200)\/+/, "$1cover500/");
}

if (domain === "book.interpark.com" ||
Expand Down
14 changes: 12 additions & 2 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -74263,7 +74263,10 @@ var $$IMU_EXPORT$$;
if (domain === "img.lemde.fr") {
// https://img.lemde.fr/2018/09/21/0/0/5203/3601/688/0/60/0/4fe60ea_5389858-01-06.jpg
// https://img.lemde.fr/2018/09/21/0/0/0/0/0/0/0/0/4fe60ea_5389858-01-06.jpg
return src.replace(/(:\/\/[^/]*\/[0-9]{4}\/+(?:[0-9]{2}\/+){2})(?:[0-9]+\/+){8}([0-9a-f]+_[0-9]+-[0-9]+-[0-9]+\.[^/.]*)(?:[?#].*)?$/, "$10/0/0/0/0/0/0/0/$2");
// thanks to anonymous for reporting:
// https://img.lemde.fr/2023/04/12/434/0/2240/1493/1440/960/60/0/4252195_1681309483888-ifn-53140422-1.jpg
// https://img.lemde.fr/2023/04/12/0/0/0/0/0/0/0/0/4252195_1681309483888-ifn-53140422-1.jpg
return src.replace(/(:\/\/[^/]*\/[0-9]{4}\/+(?:[0-9]{2}\/+){2})(?:[0-9]+\/+){8}([0-9a-f]+_[0-9]+-[^/.?#]+\.[^/.]*)(?:[?#].*)?$/, "$10/0/0/0/0/0/0/0/$2");
}
if (domain_nowww === "christian-dogma.com") {
// https://www.christian-dogma.com/im0photos/20190604/43a5c628cb83d64c44daa92448fb5348.jpg&w=100&q=90&.jpg
Expand Down Expand Up @@ -78161,9 +78164,16 @@ var $$IMU_EXPORT$$;
// https://image.aladin.co.kr/product/19928/0/cover500/k242635748_1.jpg -- 500x733
// https://image.aladin.co.kr/product/18004/88/cover150/k892534639_1.jpg
// https://image.aladin.co.kr/product/18004/88/cover500/k892534639_1.jpg
// thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1344
// https://image.aladin.co.kr/product/33894/48/cover100/k132930727_1.jpg
// https://image.aladin.co.kr/product/33894/48/cover200/k132930727_1.jpg
// https://image.aladin.co.kr/product/33894/48/cover500/k132930727_1.jpg
// https://image.aladin.co.kr/product/33894/48/letslook/k132930727_fl.jpg -- 2114x2433
// other:
// https://image.aladin.co.kr/product/17719/20/cover500/4800292263_1.jpg -- 1500x2112
return src.replace(/(\/product\/+[0-9]+\/+[0-9]+\/+)cover(?:sum|150)\/+/, "$1cover500/");
return src
.replace(/(\/product\/+[0-9]+\/+[0-9]+\/+)cover500\/+(k[0-9]+_)1\./, "$1letslook/$2fl.")
.replace(/(\/product\/+[0-9]+\/+[0-9]+\/+)cover(?:sum|1[50]0|200)\/+/, "$1cover500/");
}
if (domain === "book.interpark.com" ||
// http://bimage.interpark.com/goods_image/7/3/5/0/300247350h.jpg
Expand Down

0 comments on commit 122101a

Please sign in to comment.