Site.webmanifest”/>
'; // Add text overlay inside the YouTube embedded div jQuery('.wp-block-embed-youtube').each(function(index,element) { jQuery(element).find(“iframe”).hide() ; if (element.closest(“.wp-block-embed-youtube”)?.querySelectorAll('.external-embed-wrapper')?.length === 0) { jQuery(element).prepend(youtubeTextOverlay); } }); } setTimeout(youtubeDisplayTextoverlay, 0); } }); /* * The visitor has not consented to everything, so we need to add click event handlers to the consent buttons */ jQuery(document).on(“click”,.consent-button”,function() { var buttonElement = event.target; var embedType = jQuery(buttonElement).data('type'); if(embedType === 'youtube') { /* * Find all YouTube iframes and * add a src attribute with the value of data-src */ jQuery('.wp-block-embed-youtube iframe').each(function(index,element) { jQuery(element).attr('src', jQuery(element).attr( 'data-src')); jQuery(element).css({'z-index': 'initial', 'display': 'initial'}); }); } else if(embedType === 'instagram' ) { /* * Add instagram embed js. */ instagramIntegrate(); } else if(embedType === 'facebook') { /* * Find all Facebook/Twitter iframes and * add an src attribute with the value of data-src */ jQuery('iframe').each(function( index,element) { var src = jQuery(element).attr('data-src'); if( src !== undefined ) { if( src.indexOf('//www.facebook.com/plugins/post. php') > -1 ) { jQuery(element).attr('src', jQuery(element).data('src')); } else if(embedType === 'twitter') { /* * Add Instagram embedded js. */ var twitterScript = document.createElement('script'); twitterScript.src=”https://platform.twitter.com/widgets.js”; twitterScript.async = true; twitterScript.charset = “utf-8″; document.getElementsByTagName('head')[0].appendChild(twitterScript); } else if(embedType === 'vimeo') { /* * Find all Vimeo iframes and * add an src attribute with the value of data-src */ jQuery('.wp-block-embed-vimeo iframe' ).each(function(index,element) { jQuery(element).attr('src', jQuery(element).attr('data-src')); jQuery(element).css({'z-index' : 'initial', 'display': 'initial'}); } else if(embedType === 'slideshare') { /* * Find all Slideshare iframes and * add a src attribute with the value of data-src */ jQuery('.wp-block-embed-slideshare iframe' ).each(function(index,element) { jQuery(element).attr('src', jQuery(element).attr('data-src')); jQuery(element).css({'z-index' : 'initial', 'display': 'initial'}); }); } /* * The embedded content should now be loading * so we can hide all text overlays with this data type */ jQuery('. embed-consent-notice[data-type=”‘+ embedType +'”]').hide(); });