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