download by click

This commit is contained in:
Alexander Popov 2021-06-05 18:01:32 +03:00
parent 8046f983f1
commit 36f0ffb03d
Signed by: iiiypuk
GPG Key ID: 398FC73478D97286

View File

@ -6,7 +6,7 @@ function getCover()
videoCover.onload = function()
{
document.getElementById('ytImage').innerHTML =
'<a title="' + videoCover.width + 'x' + videoCover.height + '" download href="' + videoCover.src + '"><img src="'+ videoCover.src +'"></a>';
'<a title="' + videoCover.width + 'x' + videoCover.height + '" href="' + videoCover.src + '" download="cover"><img src="'+ videoCover.src +'"></a>';
}
videoCover.src = 'https://img.youtube.com/vi/' + YouTubeGetID(videoUrl) + '/maxresdefault.jpg';