Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

set video id when creating video element

Christian Feid7fbd230247a
diff --git a/client/main.js b/client/main.js
index 4ed7c1f..6f025da 100644
--- a/client/main.js
+++ b/client/main.js
@@ -113,6 +113,7 @@ function applyShowThumbnails(showThumbnails) {
function createVideoElement (video) {
const $video = document.createElement('video-element')
$video.dataset['data'] = JSON.stringify(video)
+ $video.dataset['videoId'] = video.id
return $video
}