1(function ($, Drupal, drupalSettings) { 2 'use strict'; 3 Drupal.behaviors.video_aplitv = { 4 attach: function (context) { 5 $('body', context).once('video_aplitv').each(function () { 6 var $videoSrc; 7 8 playVideoModal(); 9 10 $( document ).ajaxComplete(function() { 11 playVideoModal(); 12 13 14 if($('body').hasClass('ajax-running') && $('body').hasClass('search-open')) { 15 $('.ajax-progress').remove(); 16 } 17 }); 18 19 20 function playVideoModal() { 21 $('body').on('click', '.cont--video, .view-banner-rotator .node--view-mode-default .cont--watch', function () { 22 $videoSrc = $(this).find('.video__url').html(); 23 if($videoSrc === undefined) { 24 $videoSrc = $(this).parent().find('.video__url').html(); 25 } 26 if($videoSrc.indexOf('/watch?v=') >= 0) { 27 $videoSrc = $videoSrc.replace("/watch?v=", "/embed/"); 28 } 29 30 if(!$("#video").length) { 31 $('#videoModal .modal-content .modal-body .embed-responsive').append('<iframe class="embed-responsive-item" src="" id="video" allowscriptaccess="always" allow="autoplay"></iframe>'); 32 } 33 34 $("#video").attr('src',$videoSrc + "?autoplay=1&modestbranding=1&showinfo=0" ); 35 $('#videoModal').modal('show'); 36 }); 37 38 // stop playing the youtube video when I close the modal 39 $('#videoModal').on('hide.bs.modal', function (e) { 40 // a poor man's stop video 41 $("#video").attr('src',$videoSrc); 42 }) 43 } 44 45 }); 46 47 } 48 }; 49})(jQuery, Drupal, drupalSettings);
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.