1$(document).ready(function() { 2 if (typeof(window.CM) === 'undefined') { 3 embedVideoServices({ youtube:true, vimeo:true }); 4 } else { 5 let inputYoutube = document.querySelectorAll('.consent-input[data-storage-key="youtube"]'); 6 if(!inputYoutube.length) { 7 embedVideoServices({ youtube:true }); 8 } 9 let inputVimeo = document.querySelectorAll('.consent-input[data-storage-key="vimeo"]'); 10 if(!inputVimeo.length) { 11 embedVideoServices({ vimeo:true }); 12 } 13 } 14}); 15document.addEventListener('consent.ready', function(e) { 16 embedVideoServices(e.detail); 17}); 18document.addEventListener('consent.updated', function(e) { 19 embedVideoServices(e.detail); 20}); 21function embedVideoServices(detail) { 22 if (detail !== null && typeof detail.youtube !== 'undefined' && detail.youtube === true) { 23 let wrappers = document.querySelectorAll('div.needs-consent.youtube'); 24 for (let k = 0; k < wrappers.length; ++k) { 25 wrappers[k].classList.remove('d-none'); 26 } 27 let embeds = document.querySelectorAll('iframe.needs-consent.youtube, script[data-consent="youtube"]'); 28 for (let i = 0; i < embeds.length; ++i) { 29 embeds[i].src = embeds[i].dataset.src; 30 embeds[i].className = 'youtube'; 31 } 32 let notices = document.querySelectorAll('a[data-consent="youtube"]'); 33 for (let j = 0; j < notices.length; ++j) { 34 notices[j].classList.add('d-none'); 35 } 36 } 37 if (detail !== null && typeof detail.vimeo !== 'undefined' && detail.vimeo === true) { 38 let wrappers = document.querySelectorAll('div.needs-consent.vimeo'); 39 for (let k = 0; k < wrappers.length; ++k) { 40 wrappers[k].classList.remove('d-none'); 41 } 42 let embeds = document.querySelectorAll('iframe.needs-consent.vimeo, script[data-consent="vimeo"]'); 43 for (let i = 0; i < embeds.length; ++i) { 44 embeds[i].src = embeds[i].dataset.src; 45 embeds[i].className = 'vimeo'; 46 } 47 let notices = document.querySelectorAll('a[data-consent="vimeo"]'); 48 for (let j = 0; j < notices.length; ++j) { 49 notices[j].classList.add('d-none'); 50 } 51 } 52} 53function embedYoutube(detail) { 54 embedVideoServices(detail); 55}
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.