1(function($){ 2 "use strict"; 3 4 5 $(window).on('elementor/frontend/init', function () { 6 7 elementorFrontend.hooks.addAction('frontend/element_ready/auntri_elementor_video.default', function(){ 8 9 /* Add your code here */ 10 $('.ova-video').each( function() { 11 var that = $(this); 12 13 var video_active = that.find('.video_active'); 14 var modal_container = that.find('.modal-container'); 15 var modal_close = that.find('.ovaicon-cancel'); 16 var modal_video = that.find('.modal-video'); 17 18 // btn video click 19 video_active.on( 'click', function() { 20 var btn_video = $(this).find('.video-btn') 21 var url = get_url( btn_video.data('src') ); 22 var autoplay = btn_video.data('autoplay'); 23 var mute = btn_video.data('mute'); 24 var loop = btn_video.data('loop'); 25 var controls = btn_video.data('controls'); 26 var modest = btn_video.data('modest'); 27 var showinfo = btn_video.data('show_info'); 28 var option = '?'; 29 option += ( 'yes' == autoplay ) ? 'autoplay=1' : 'autoplay=0'; 30 option += ( 'yes' == mute ) ? '&mute=1' : '&mute=0'; 31 option += ( 'yes' == loop ) ? '&loop=1' : '&loop=0'; 32 option += ( 'yes' == controls ) ? '&controls=1' : '&controls=0'; 33 option += ( 'yes' == showinfo ) ? '&showinfo=1' : '&showinfo=0'; 34 option += ( 'yes' == modest ) ? '&modestbranding=1' : '&modestbranding=0'; 35 36 if ( url != 'error' ) { 37 modal_video.attr('src', "https://www.youtube.com/embed/" + url + option ); 38 modal_container.css('display', 'flex'); 39 } 40 }); 41 42 // close video 43 modal_close.on('click', function() { 44 modal_container.hide(); 45 modal_video.removeAttr('src'); 46 }); 47 48 // window click 49 $(window).click( function(e) { 50 if ( e.target.className == 'modal-container' ) { 51 modal_container.hide(); 52 modal_video.removeAttr('src'); 53 } 54 }); 55 }); 56 57 function get_url( url ) { 58 var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/; 59 var match = url.match(regExp); 60 61 if (match && match[2].length == 11) { 62 return match[2]; 63 } else { 64 return 'error'; 65 } 66 } 67 68 69 }); 70 71 72 }); 73 74})(jQuery);
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.