1function handleVideoOverlay(videos) { 2 if (videos === undefined) { 3 //default 4 var videos = [{ 5 videoId: 'fN2OmZmogkE', 6 posterUrl: '/wp-content/themes/ventura_2018/icona_natale.png' 7 }] 8 } 9 10 var jq_videocontainer = jQuery('.overlay-video-container'); 11 var jq_openbtn = jQuery('.overlay-video-open'); 12 var jq_videocontent = jQuery('.overlay-video-container .overlay-video-content'); 13 var jq_closebtn = jQuery('.overlay-video-close'); 14 15 var chosen = videos[Math.floor(Math.random() * videos.length)] 16 17 if (chosen.posterUrl) jq_openbtn.css('background-image', 'url(' + chosen.posterUrl + ')'); 18 19 function openOverlay() { 20 jq_videocontainer.addClass('active'); 21 jq_videocontent.html( 22 '<iframe width="560" height="315" src="https://www.youtube.com/embed/' + chosen.videoId + '?rel=0&autoplay=1" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>' 23 ) 24 } 25 26 function closeOverlay() { 27 jq_videocontainer.removeClass('active'); 28 jq_videocontent.html(''); 29 } 30 31 jq_openbtn.click(openOverlay); 32 jq_closebtn.click(closeOverlay); 33 jq_videocontainer.click(closeOverlay); 34 35}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.