Skip to content

Commit

Permalink
Improve youtube shorts thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Sep 15, 2024
1 parent 4b74bb0 commit 15fdf35
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
2024.9.0 (in-dev)

Special thanks to nimbuz, remlap, Solus, immewnity, Froktime, billkewl for their contributions and reports for this release
Special thanks to nimbuz, remlap, Solus, immewnity, Froktime, billkewl, Broly for their contributions and reports for this release

---

Expand Down
4 changes: 4 additions & 0 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31941,6 +31941,9 @@ var $$IMU_EXPORT$$;
// https://i1.ytimg.com/vi/KSUGZNEP-T4/maxres1.jpg
// https://i.ytimg.com/vi_webp/c8e9Nc36lRg/mqdefault.webp
// https://i.ytimg.com/vi_webp/c8e9Nc36lRg/sddefault.webp
// thanks to Broly on discord:
// https://i.ytimg.com/vi/z6mQrSDB3kA/maxres2.jpg
// https://i.ytimg.com/vi/z6mQrSDB3kA/oardefault.jpg
// doesn't work for some urls:
// https://i.ytimg.com/vi/o-gVbQHG0Ck/hqdefault.jpg
// https://i.ytimg.com/vi/o-gVbQHG0Ck/sddefault.jpg -- different image
Expand Down Expand Up @@ -31977,6 +31980,7 @@ var $$IMU_EXPORT$$;
regex = /^(.+\/+(?:vi|an)(?:_webp)?\/+[^/]*\/+)[a-z]*(default|[0-9]+)(?:_(?:live|[0-9]+s))?(\.[^/.?#]*)(?:[?#].*)?$/;
if (regex.test(src) /*&& !problem_excluded("possibly_different")*/) {
var sizes = [
"oar", // shorts
"maxres",
//"hq720", // don't use because it'll break mq1 etc.
"sd",
Expand Down
4 changes: 4 additions & 0 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -29201,6 +29201,9 @@ var $$IMU_EXPORT$$;
// https://i1.ytimg.com/vi/KSUGZNEP-T4/maxres1.jpg
// https://i.ytimg.com/vi_webp/c8e9Nc36lRg/mqdefault.webp
// https://i.ytimg.com/vi_webp/c8e9Nc36lRg/sddefault.webp
// thanks to Broly on discord:
// https://i.ytimg.com/vi/z6mQrSDB3kA/maxres2.jpg
// https://i.ytimg.com/vi/z6mQrSDB3kA/oardefault.jpg
// doesn't work for some urls:
// https://i.ytimg.com/vi/o-gVbQHG0Ck/hqdefault.jpg
// https://i.ytimg.com/vi/o-gVbQHG0Ck/sddefault.jpg -- different image
Expand Down Expand Up @@ -29233,6 +29236,7 @@ var $$IMU_EXPORT$$;
regex = /^(.+\/+(?:vi|an)(?:_webp)?\/+[^/]*\/+)[a-z]*(default|[0-9]+)(?:_(?:live|[0-9]+s))?(\.[^/.?#]*)(?:[?#].*)?$/;
if (regex.test(src) /*&& !problem_excluded("possibly_different")*/) {
var sizes = [
"oar", // shorts
"maxres",
//"hq720", // don't use because it'll break mq1 etc.
"sd",
Expand Down

0 comments on commit 15fdf35

Please sign in to comment.