Skip to content

Commit

Permalink
Support tammi.fi (fixes #1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Aug 18, 2024
1 parent 208c134 commit 1d1587c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115537,6 +115537,14 @@ var $$IMU_EXPORT$$;
}
}

if (amazon_container === "kirja") {
// thanks to fyhtma on github: https://github.com/qsniyg/maxurl/issues/1353
// https://kirja.s3.amazonaws.com/prod/9789520425715_frontcover_final_medium.jpg
// https://kirja.s3.amazonaws.com/prod/9789520425715_frontcover_final_large.jpg
// https://kirja.s3.amazonaws.com/prod/9789520425715_frontcover_final_original.jpg -- 1642x2610
return src.replace(/(\/prod\/+[0-9]+_[_a-z]+_)(?:small|medium|large)\./, "$1original.");
}




Expand Down
7 changes: 7 additions & 0 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -103741,6 +103741,13 @@ var $$IMU_EXPORT$$;
return add_queries(keep_queries(src, ["h", "p", "s"]), { "size": "origin" });
}
}
if (amazon_container === "kirja") {
// thanks to fyhtma on github: https://github.com/qsniyg/maxurl/issues/1353
// https://kirja.s3.amazonaws.com/prod/9789520425715_frontcover_final_medium.jpg
// https://kirja.s3.amazonaws.com/prod/9789520425715_frontcover_final_large.jpg
// https://kirja.s3.amazonaws.com/prod/9789520425715_frontcover_final_original.jpg -- 1642x2610
return src.replace(/(\/prod\/+[0-9]+_[_a-z]+_)(?:small|medium|large)\./, "$1original.");
}
// -- 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 1d1587c

Please sign in to comment.