1/** 2 * Click-to-play YouTube embeds (thumbnail first, matches prod Semantic embeds). 3 */ 4(function () { 5 document.querySelectorAll('[data-video-embed]').forEach((root) => { 6 const button = root.querySelector('.video-embed__poster'); 7 const id = root.getAttribute('data-video-id'); 8 const title = root.getAttribute('data-video-title') || 'YouTube video'; 9 if (!button || !id) { 10 return; 11 } 12 13 button.addEventListener('click', () => { 14 const iframe = document.createElement('iframe'); 15 iframe.src = `https://www.youtube-nocookie.com/embed/${encodeURIComponent(id)}?autoplay=1&modestbranding=1&rel=0`; 16 iframe.title = title; 17 iframe.allow = 18 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share'; 19 iframe.allowFullscreen = true; 20 iframe.setAttribute('allowfullscreen', ''); 21 iframe.tabIndex = 0; 22 root.replaceChildren(iframe); 23 iframe.focus(); 24 }); 25 }); 26})();
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.