diff --git a/youtube-thumbnails.html b/youtube-thumbnails.html index 34c7ea6..e935b4d 100644 --- a/youtube-thumbnails.html +++ b/youtube-thumbnails.html @@ -76,23 +76,26 @@

YouTube Thumbnail Viewer

const input = document.getElementById("videoInput").value.trim(); const videoID = extractVideoID(input); if (videoID.length === 11) { - const imageTypes = ['default', 'hqdefault', 'mqdefault', 'sddefault', 'maxresdefault', '0', '1', '2', '3']; + const imageTypes = ['default', '1', '2', '3']; + const imageQuality = ['', 'mq', 'hq', 'sd', 'maxres']; const container = document.getElementById("thumbnails"); container.innerHTML = ''; imageTypes.forEach(type => { - const imageUrl = `https://img.youtube.com/vi/${videoID}/${type}.jpg`; - const thumbnailHTML = ` -
- Thumbnail ${type} -

-
- 📋 - ${imageUrl} + imageQuality.forEach(quality => { + const imageUrl = `https://img.youtube.com/vi/${videoID}/${quality}${type}.jpg`; + const thumbnailHTML = ` +
+ Thumbnail ${type} +

+
+ 📋 + ${imageUrl} +
-
- `; - container.innerHTML += thumbnailHTML; + `; + container.innerHTML += thumbnailHTML; + }); }); // Get actual image sizes after they've loaded