1(function($) 2{ 3 "use strict"; 4 5 6 $('body').on( 'click', '.av-lazyload-video-embed .av-click-to-play-overlay', function(e) 7 { 8 var clicked = $(this); 9 10 // check if videos are disabled by user setting via cookie - or user must opt in. 11 var cookie_check = $('html').hasClass('av-cookies-needs-opt-in') || $('html').hasClass('av-cookies-can-opt-out'); 12 var allow_continue = true; 13 var silent_accept_cookie = $('html').hasClass('av-cookies-user-silent-accept'); 14 15 if( cookie_check && ! silent_accept_cookie ) 16 { 17 if( ! document.cookie.match(/aviaCookieConsent/) || $('html').hasClass('av-cookies-session-refused') ) 18 { 19 allow_continue = false; 20 } 21 else 22 { 23 if( ! document.cookie.match(/aviaPrivacyRefuseCookiesHideBar/) ) 24 { 25 allow_continue = false; 26 } 27 else if( ! document.cookie.match(/aviaPrivacyEssentialCookiesEnabled/) ) 28 { 29 allow_continue = false; 30 } 31 else if( document.cookie.match(/aviaPrivacyVideoEmbedsDisabled/) ) 32 { 33 allow_continue = false; 34 } 35 } 36 } 37 38 var container = clicked.parents( '.av-lazyload-v
38ideo-embed' ); 39 if( container.hasClass( 'avia-video-lightbox' ) && container.hasClass( 'avia-video-standard-html' ) ) 40 { 41 allow_continue = true; 42 } 43 44 if( ! allow_continue ) 45 { 46 if( typeof e.originalEvent == 'undefined' ) { return; } //human click only 47 48 var src_url = container.data('original_url'); 49 if( src_url ) window.open( src_url , '_blank', 'noreferrer noopener' ); 50 51 return; 52 } 53 54 55 var video = container.find('.av-video-tmpl').html(); 56 var link = ''; 57 58 if( container.hasClass( 'avia-video-lightbox' ) ) 59 { 60 link = container.find( 'a.lightbox-link' ); 61 if( link.length == 0 ) 62 { 63 container.append( video ); 64 65 // DOM not ready 66 setTimeout(function(){ 67 link = container.find( 'a.lightbox-link' ); 68 if( $( 'html' ).hasClass( 'av-default-lightbox' ) ) 69 { 70 link.addClass( 'lightbox-added' ).magnificPopup( $.avia_utilities.av_popup ); 71 link.trigger( 'click' ); 72 } 73 else 74 { 75 link.trigger( 'avia-open-video-in-lightbox' ); 76 } 77 }, 100 ); 78 } 79 else 80 { 81 link.trigger( 'click' ); 82 } 83 } 84 else 85 { 86 container.html( video ); 87 } 88 89 }); 90 91 $('.av-lazyload-immediate .av-click-to-play-overlay').trigger('click'); 92 93}(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.