1 2function loadBrightCoveScripts() { 3 let brightcove_videos = document.querySelectorAll('.iframe-col .video-js'); 4 5 brightcove_videos.forEach((brightcove_video) => { 6 const accountId = brightcove_video.getAttribute('data-account'); 7 const playerId = brightcove_video.getAttribute('data-player') || 'default'; 8 const playerScript = `${accountId}/${playerId}_default/index.min.js`; 9 10 if (!accountId || brightcove_video.parentNode.querySelector(`script[src*="${playerScript}"]`)) { 11 return; 12 } 13 14 let script = document.createElement("script"); 15 script.async = true; 16 script.src = `https://players.brightcove.net/${playerScript}`; 17 brightcove_video.parentNode.insertBefore(script, brightcove_video.nextSibling); 18 }); 19} 20 21if (document.readyState === 'loading') { 22 document.addEventListener('DOMContentLoaded', loadBrightCoveScripts); 23} else { 24 loadBrightCoveScripts(); 25} 26 27const heroBrightcovePreviewObserver = new MutationObserver((mutations) => { 28 const hasHeroPreview = mutations.some((mutation) => { 29 return Array.from(mutation.addedNodes).some((node) => { 30 return node.nodeType === Node.ELEMENT_NODE 31 && ( 32 node.matches('.mco-b2-hero-block') 33 || node.querySelector('.mco-b2-hero-block') 34 ); 35 }); 36 }); 37 38 if (hasHeroPreview) { 39 loadBrightCoveScripts(); 40 } 41}); 42 43heroBrightcovePreviewObserver.observe(document.documentElement, { 44 childList: true, 45 subtree: true, 46});
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.