Skip to content

Commit

Permalink
Improve mediadelivery.fi rule (fixes #270)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Apr 23, 2024
1 parent 9e733d6 commit 960ee8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92996,6 +92996,9 @@ var $$IMU_EXPORT$$;

if (domain === "hs.mediadelivery.fi" ||
// https://is.mediadelivery.fi/img/658/0fc78cb8a1474ec2b20d891a8e033b37.jpg
// thanks to fyhtma on github: https://github.com/qsniyg/maxurl/issues/270
// https://is.mediadelivery.fi/img/1920/0fc78cb8a1474ec2b20d891a8e033b37.jpg.webp
// https://is.mediadelivery.fi/img/1920/0fc78cb8a1474ec2b20d891a8e033b37.jpg
domain === "is.mediadelivery.fi") {
// thanks to thomas-ed on github: https://github.com/qsniyg/maxurl/issues/270
// https://www.hs.fi/talous/art-2000006442426.html
Expand All @@ -93009,6 +93012,9 @@ var $$IMU_EXPORT$$;
// https://hs.mediadelivery.fi/img/square/1440/d279bcab15194b45b4654246d69adb25.jpg.webp
// https://hs.mediadelivery.fi/img/square/1920/d279bcab15194b45b4654246d69adb25.jpg.webp
newsrc = src.replace(/(\/img\/+(?:square\/+)?)(?:[0-9]{3}|1[0-8][0-9]{2})\//, "$11920/");
if (newsrc === src) {
newsrc = src.replace(/(\.[a-z]+)\.webp(?:[?#].*)?$/, "$1");
}
if (newsrc !== src) {
return {
url: newsrc,
Expand Down
6 changes: 6 additions & 0 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -83614,6 +83614,9 @@ var $$IMU_EXPORT$$;
}
if (domain === "hs.mediadelivery.fi" ||
// https://is.mediadelivery.fi/img/658/0fc78cb8a1474ec2b20d891a8e033b37.jpg
// thanks to fyhtma on github: https://github.com/qsniyg/maxurl/issues/270
// https://is.mediadelivery.fi/img/1920/0fc78cb8a1474ec2b20d891a8e033b37.jpg.webp
// https://is.mediadelivery.fi/img/1920/0fc78cb8a1474ec2b20d891a8e033b37.jpg
domain === "is.mediadelivery.fi") {
// thanks to thomas-ed on github: https://github.com/qsniyg/maxurl/issues/270
// https://www.hs.fi/talous/art-2000006442426.html
Expand All @@ -83627,6 +83630,9 @@ var $$IMU_EXPORT$$;
// https://hs.mediadelivery.fi/img/square/1440/d279bcab15194b45b4654246d69adb25.jpg.webp
// https://hs.mediadelivery.fi/img/square/1920/d279bcab15194b45b4654246d69adb25.jpg.webp
newsrc = src.replace(/(\/img\/+(?:square\/+)?)(?:[0-9]{3}|1[0-8][0-9]{2})\//, "$11920/");
if (newsrc === src) {
newsrc = src.replace(/(\.[a-z]+)\.webp(?:[?#].*)?$/, "$1");
}
if (newsrc !== src) {
return {
url: newsrc,
Expand Down

0 comments on commit 960ee8f

Please sign in to comment.