1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-21 21:19:36 +01:00

youtube.js: format

This commit is contained in:
Zankaria 2024-08-05 18:50:08 +02:00
parent b822a76b23
commit 023e59d88f

View File

@ -22,13 +22,12 @@
*
*/
onready(function(){
var do_embed_yt = function(tag) {
onready(function() {
let do_embed_yt = function(tag) {
$('div.video-container a', tag).click(function() {
var videoID = $(this.parentNode).data('video');
let videoID = $(this.parentNode).data('video');
$(this.parentNode).html('<iframe style="float:left;margin: 10px 20px" type="text/html" '+
$(this.parentNode).html('<iframe style="float:left;margin: 10px 20px" type="text/html" ' +
'width="360" height="270" src="//www.youtube.com/embed/' + videoID +
'?autoplay=1&html5=1" allowfullscreen frameborder="0"/>');
@ -42,4 +41,3 @@ onready(function(){
do_embed_yt(post);
});
});