Skip to content

Commit

Permalink
More websites/rules
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Feb 15, 2024
1 parent 053b3ca commit fd02e14
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112320,6 +112320,21 @@ var $$IMU_EXPORT$$;
return src.replace(/(\/photo\/+media\/+galleries\/+[^/]+\/+[^/]+\/+)normal\/+/, "$1big/");
}

if (domain_nowww === "caps-a-holic.com") {
// thanks to nimbuz on discord for reporting:
// https://caps-a-holic.com/c_image.php?max_height=1080&s=89274&a=1&x=451&y=176&l=0
// https://caps-a-holic.com/c_image.php?max_height=2160&s=89274&a=0&x=0&y=0&l=1
// l = lossless
// a = crop
if (/\/c_image\.php\?/.test(src)) {
newsrc = keep_queries(src, ["max_height", "s"]) + "&a=0&x=0&y=0&l=1";
if (newsrc !== src)
return newsrc;

return newsrc.replace(/([?&]max_height=)[0-9]+/, "$12160");
}
}




Expand Down
13 changes: 13 additions & 0 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -100819,6 +100819,19 @@ var $$IMU_EXPORT$$;
// https://www.tulup.ru/photo/media/galleries/2017-01-28.universiade/3_feb_men_training/big/DSC04235.JPG -- 404
return src.replace(/(\/photo\/+media\/+galleries\/+[^/]+\/+[^/]+\/+)normal\/+/, "$1big/");
}
if (domain_nowww === "caps-a-holic.com") {
// thanks to nimbuz on discord for reporting:
// https://caps-a-holic.com/c_image.php?max_height=1080&s=89274&a=1&x=451&y=176&l=0
// https://caps-a-holic.com/c_image.php?max_height=2160&s=89274&a=0&x=0&y=0&l=1
// l = lossless
// a = crop
if (/\/c_image\.php\?/.test(src)) {
newsrc = keep_queries(src, ["max_height", "s"]) + "&a=0&x=0&y=0&l=1";
if (newsrc !== src)
return newsrc;
return newsrc.replace(/([?&]max_height=)[0-9]+/, "$12160");
}
}
// -- 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 fd02e14

Please sign in to comment.