Commit 6cfee976 authored by Johannes Kreiner's avatar Johannes Kreiner
Browse files

[TASK] Cleanup

parent b757b575
......@@ -15,8 +15,8 @@ module.exports = function() {
$('.sg-youtube-item').each(function (index, item) {
let $youtubeItem = $(item),
viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
if (($youtubeItem.data('disable-lightbox') && viewportWidth >= 680)
|| ($youtubeItem.data('disable-lightbox-mobile') && viewportWidth < 680)
if (($youtubeItem.data('disable-lightbox') && viewportWidth >= 680) ||
($youtubeItem.data('disable-lightbox-mobile') && viewportWidth < 680)
) {
$youtubeItem.on('click', replaceThumbnailWithVideo);
} else {
......@@ -59,7 +59,7 @@ module.exports = function() {
'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>')
'allowfullscreen></iframe></div>');
}
/**
......@@ -77,8 +77,7 @@ module.exports = function() {
return null;
}
}
let videoString = matches[1],
let [, videoString] = matches,
queryParameterSeparator = '?';
if (matches[2]) {
videoString += '?list=' + matches[2];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment