mirror of
https://github.com/kforney/kforney.github.io.git
synced 2024-11-14 02:52:02 -07:00
Fetch YouTube thumbnails in WebP format.
This commit is contained in:
parent
e27f2747c5
commit
51649e2364
1 changed files with 1 additions and 4 deletions
|
@ -455,8 +455,7 @@
|
|||
let youtube = document.querySelectorAll(".youtube-video");
|
||||
|
||||
for (let i = 0; i < youtube.length; i++) {
|
||||
|
||||
let source = "https://img.youtube.com/vi/" + youtube[i].dataset.embed + "/maxresdefault.jpg";
|
||||
let source = "https://i.ytimg.com/vi_webp/" + youtube[i].dataset.embed + "/maxresdefault.webp";
|
||||
|
||||
let image = new Image();
|
||||
image.src = source;
|
||||
|
@ -475,8 +474,6 @@
|
|||
this.innerHTML = "";
|
||||
this.appendChild(iframe);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue