diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf index 34562c705769a5df80f75cd07a882961c3da846d..d878ef7d18a56a7e440c25f59f3acec2b9fd7d36 100644 --- a/Resources/Private/Language/de.locallang.xlf +++ b/Resources/Private/Language/de.locallang.xlf @@ -26,8 +26,8 @@ <target><![CDATA[Aspect Ratio (nur genutzt, wenn der Thumbnail-Typ dies prüfen soll)]]></target> </trans-unit> <trans-unit id="flexform.disableLightbox" approved="yes"> - <source><![CDATA[Replace the thumbnail with the video and disable the lightbox?]]></source> - <target><![CDATA[Das Thumbnail durch das Video ersetzen und die Lightbox deaktivieren?]]></target> + <source><![CDATA[Replace the thumbnail with the video and disable the lightbox]]></source> + <target><![CDATA[Das Thumbnail durch das Video ersetzen und die Lightbox deaktivieren]]></target> </trans-unit> <trans-unit id="flexform.id" approved="yes"> <source><![CDATA[ID of Channel (UC), Playlist (PL) or Single Video (youtube.com/watch?v=%ID%)]]></source> diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index d6f0e46d61c517a1d6bb2ce5b5333df7baffeafb..b20d2cd2e362e1e293f89fdc159574cc8b60f53d 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -21,7 +21,7 @@ <source><![CDATA[Aspect Ratio (only used if thumbnail type is set to check that)]]></source> </trans-unit> <trans-unit id="flexform.disableLightbox"> - <source><![CDATA[Replace the thumbnail with the video and disable the lightbox?]]></source> + <source><![CDATA[Replace the thumbnail with the video and disable the lightbox]]></source> </trans-unit> <trans-unit id="flexform.id"> <source><![CDATA[ID of Channel (UC), Playlist (PL) or Single Video (youtube.com/watch?v=%ID%)]]></source> diff --git a/Resources/Public/JavaScript/youtubeLightbox.js b/Resources/Public/JavaScript/youtubeLightbox.js index a266c31c63e10a6daa156f07797d9ce7be6ec91c..c14d82a8d77da1ff0d34f7ae642edbc9e74a64a2 100644 --- a/Resources/Public/JavaScript/youtubeLightbox.js +++ b/Resources/Public/JavaScript/youtubeLightbox.js @@ -45,14 +45,17 @@ module.exports = function() { let $youtubeItem = $(event.currentTarget); // This needs to be done, because the height of inline elements is always 0, if on auto... - $youtubeItem.css('display', 'inherit'); + $youtubeItem.css('display', 'block'); let queryString = prepareVideoUrl($youtubeItem.attr('href')), + width = $youtubeItem.outerWidth() + 'px', height = $youtubeItem.outerHeight() + 'px'; - $youtubeItem.replaceWith('<div class="sg-youtube-item sg-card-shadow" style="height: ' + height + '"><iframe ' + - 'width="100%" height="' + height + '" ' + + $youtubeItem.replaceWith('<div class="sg-youtube-item sg-card-shadow" ' + + 'style="height: ' + height + '; width: ' + width + ';"><iframe ' + + 'width="' + width + '" height="' + height + '" ' + 'src="https://www.youtube-nocookie.com/embed/' + queryString + '" frameborder="0" ' + - 'allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>') + 'allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" ' + + 'allowfullscreen></iframe></div>') } /**