Skip to content

Commit

Permalink
Improve mdpr rule (fixes #1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Mar 8, 2024
1 parent 5baa4d4 commit 5e1b7db
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Improvements:

* Various improvements/fixes to existing rules (including SmugMug)

Special thanks to f2005, VS, Froktime, Viper33, barry, snek, fireattack, leoli1110 for their contributions and reports for this release
Special thanks to f2005, VS, Froktime, Viper33, barry, snek, fireattack, leoli1110, billkewl for their contributions and reports for this release

---

Expand Down
12 changes: 10 additions & 2 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32019,8 +32019,6 @@ var $$IMU_EXPORT$$;
(domain_nosub === "tchyn.io" && string_indexof(src, "/snopes-production/uploads/") >= 0) ||
// http://img.diply.com/article-images/a/884c637e-7288-480a-a2df-543ff15ae971.jpg?impolicy=mobile
domain === "img.diply.com" ||
// https://img-mdpr.freetls.fastly.net/article/Wf7O/nm/Wf7Oi0E0-_n8CRBG4lyiHeFarklxrewLePLfp6cFSf0.jpg?width=250&enable=upscale&crop=250:250,offset-y0&auto=webp&quality=50
domain === "img-mdpr.freetls.fastly.net" ||
// https://cdn-assets.ziniopro.com/var/site_877/storage/images/media2/cover187/440239-1-eng-US/cover2.jpg?w=200
domain === "cdn-assets.ziniopro.com" ||
// https://netherlands-grlk5lagedl.stackpathdns.com/production/netherlands/images/1526305860593210-Julianne-Moore-in-Givenchy-.jpg?w=802&h=720&fit=clip&fm=pjpg&auto=compress
Expand Down Expand Up @@ -43836,6 +43834,16 @@ var $$IMU_EXPORT$$;
// https://cdn.mdpr.jp/photo/images/4d/9be/eb892aca2b6f152631f04dbe0b7ec6d67bad6240e6373cd5.jpg
}

if (domain === "img-mdpr.freetls.fastly.net") {
// https://img-mdpr.freetls.fastly.net/article/Wf7O/nm/Wf7Oi0E0-_n8CRBG4lyiHeFarklxrewLePLfp6cFSf0.jpg?width=250&enable=upscale&crop=250:250,offset-y0&auto=webp&quality=50
// https://img-mdpr.freetls.fastly.net/article/Wf7O/nm/Wf7Oi0E0-_n8CRBG4lyiHeFarklxrewLePLfp6cFSf0.jpg
// https://img-mdpr.freetls.fastly.net/article/Wf7O/nm/Wf7Oi0E0-_n8CRBG4lyiHeFarklxrewLePLfp6cFSf0.jpg?quality=100
// thanks to billkewl on github: https://github.com/qsniyg/maxurl/issues/1290
// https://img-mdpr.freetls.fastly.net/article/3PAL/nm/3PALRhB9GlTvhbGVrKYxgnU0GJMdFkmrnGGowdtaTok.jpg
// https://img-mdpr.freetls.fastly.net/article/3PAL/nm/3PALRhB9GlTvhbGVrKYxgnU0GJMdFkmrnGGowdtaTok.jpg?quality=100
return src.replace(/(?:\?.*)?$/, "?quality=100");
}

if (domain_nowww === "sponichi.co.jp") {
// http://www.sponichi.co.jp/entertainment/news/2017/12/12/jpeg/20171211s00041000381000p_thum.jpg
// http://www.sponichi.co.jp/entertainment/news/2017/12/12/jpeg/20171211s00041000381000p_view.jpg
Expand Down
11 changes: 9 additions & 2 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -29200,8 +29200,6 @@ var $$IMU_EXPORT$$;
(domain_nosub === "tchyn.io" && string_indexof(src, "/snopes-production/uploads/") >= 0) ||
// http://img.diply.com/article-images/a/884c637e-7288-480a-a2df-543ff15ae971.jpg?impolicy=mobile
domain === "img.diply.com" ||
// https://img-mdpr.freetls.fastly.net/article/Wf7O/nm/Wf7Oi0E0-_n8CRBG4lyiHeFarklxrewLePLfp6cFSf0.jpg?width=250&enable=upscale&crop=250:250,offset-y0&auto=webp&quality=50
domain === "img-mdpr.freetls.fastly.net" ||
// https://cdn-assets.ziniopro.com/var/site_877/storage/images/media2/cover187/440239-1-eng-US/cover2.jpg?w=200
domain === "cdn-assets.ziniopro.com" ||
// https://netherlands-grlk5lagedl.stackpathdns.com/production/netherlands/images/1526305860593210-Julianne-Moore-in-Givenchy-.jpg?w=802&h=720&fit=clip&fm=pjpg&auto=compress
Expand Down Expand Up @@ -40086,6 +40084,15 @@ var $$IMU_EXPORT$$;
// https://cdn.mdpr.jp/photo/images/4d/9be/w700c-ez_eb892aca2b6f152631f04dbe05759594bb7ec6d6e6373cd5.jpg
// https://cdn.mdpr.jp/photo/images/4d/9be/eb892aca2b6f152631f04dbe0b7ec6d67bad6240e6373cd5.jpg
}
if (domain === "img-mdpr.freetls.fastly.net") {
// https://img-mdpr.freetls.fastly.net/article/Wf7O/nm/Wf7Oi0E0-_n8CRBG4lyiHeFarklxrewLePLfp6cFSf0.jpg?width=250&enable=upscale&crop=250:250,offset-y0&auto=webp&quality=50
// https://img-mdpr.freetls.fastly.net/article/Wf7O/nm/Wf7Oi0E0-_n8CRBG4lyiHeFarklxrewLePLfp6cFSf0.jpg
// https://img-mdpr.freetls.fastly.net/article/Wf7O/nm/Wf7Oi0E0-_n8CRBG4lyiHeFarklxrewLePLfp6cFSf0.jpg?quality=100
// thanks to billkewl on github: https://github.com/qsniyg/maxurl/issues/1290
// https://img-mdpr.freetls.fastly.net/article/3PAL/nm/3PALRhB9GlTvhbGVrKYxgnU0GJMdFkmrnGGowdtaTok.jpg
// https://img-mdpr.freetls.fastly.net/article/3PAL/nm/3PALRhB9GlTvhbGVrKYxgnU0GJMdFkmrnGGowdtaTok.jpg?quality=100
return src.replace(/(?:\?.*)?$/, "?quality=100");
}
if (domain_nowww === "sponichi.co.jp") {
// http://www.sponichi.co.jp/entertainment/news/2017/12/12/jpeg/20171211s00041000381000p_thum.jpg
// http://www.sponichi.co.jp/entertainment/news/2017/12/12/jpeg/20171211s00041000381000p_view.jpg
Expand Down

0 comments on commit 5e1b7db

Please sign in to comment.