Skip to content
Snippets Groups Projects
Commit 6cfee976 authored by Johannes Kreiner's avatar Johannes Kreiner
Browse files

[TASK] Cleanup

parent b757b575
No related branches found
No related tags found
No related merge requests found
...@@ -15,8 +15,8 @@ module.exports = function() { ...@@ -15,8 +15,8 @@ module.exports = function() {
$('.sg-youtube-item').each(function (index, item) { $('.sg-youtube-item').each(function (index, item) {
let $youtubeItem = $(item), let $youtubeItem = $(item),
viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0); viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
if (($youtubeItem.data('disable-lightbox') && viewportWidth >= 680) if (($youtubeItem.data('disable-lightbox') && viewportWidth >= 680) ||
|| ($youtubeItem.data('disable-lightbox-mobile') && viewportWidth < 680) ($youtubeItem.data('disable-lightbox-mobile') && viewportWidth < 680)
) { ) {
$youtubeItem.on('click', replaceThumbnailWithVideo); $youtubeItem.on('click', replaceThumbnailWithVideo);
} else { } else {
...@@ -59,7 +59,7 @@ module.exports = function() { ...@@ -59,7 +59,7 @@ module.exports = function() {
'width="' + width + '" height="' + height + '" ' + 'width="' + width + '" height="' + height + '" ' +
'src="https://www.youtube-nocookie.com/embed/' + queryString + '" frameborder="0" ' + 'src="https://www.youtube-nocookie.com/embed/' + queryString + '" frameborder="0" ' +
'allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" ' + 'allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" ' +
'allowfullscreen></iframe></div>') 'allowfullscreen></iframe></div>');
} }
/** /**
...@@ -77,8 +77,7 @@ module.exports = function() { ...@@ -77,8 +77,7 @@ module.exports = function() {
return null; return null;
} }
} }
let [, videoString] = matches,
let videoString = matches[1],
queryParameterSeparator = '?'; queryParameterSeparator = '?';
if (matches[2]) { if (matches[2]) {
videoString += '?list=' + matches[2]; videoString += '?list=' + matches[2];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment