1document.addEventListener('DOMContentLoaded', function() { 2 document.querySelectorAll('a[href*="youtube.com/watch"], a[href*="youtu.be/"]').forEach(function(link) { 3 link.addEventListener('click', function(event) { 4 event.preventDefault(); 5 event.stopPropagation(); 6 const url = new URL(this.href); 7 let videoId = url.searchParams.get('v'); 8 if (!videoId && url.hostname.includes('youtu.be')) { 9 videoId = url.pathname.slice(1); 10 } 11 if (videoId) { 12 const embedUrl = `https://www.youtube.com/embed/${videoId}?autoplay=1&mute=0`; 13 const iframeContent = `<iframe src="${embedUrl}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>`; 14 Overlay.open(iframeContent); 15 } 16 }); 17 }); 18 document.querySelectorAll('a[href*="vimeo.com/"]').forEach(function(link) { 19 link.addEventListener('click', function(event) { 20 event.preventDefault(); 21 event.stopPropagation(); 22 const url = new URL(this.href); 23 let videoId = url.pathname.split('/').filter(Boolean).pop(); 24 if (videoId) { 25 const embedUrl = `https://player.vimeo.com/video/${videoId}?badge=0&autopause=0&autoplay=1&player_id=0`; 26 const iframeContent = `<iframe src="${embedUrl}" frameborder="0" allow="autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media; web-share" referrerpolicy="strict-origin-when-cross-origin"></iframe>`; 27 Overlay.open(iframeContent); 28 } 29 }); 30 }); 31 document.querySelectorAll('a[href$=".mp4"], a[href$=".webm"]').forEach(function(link) { 32 link.addEventListener('click', function(event) { 33 event.preventDefault(); 34 event.stopPropagation(); 35 const videoUrl = this.href; 36 const ext = videoUrl.endsWith('.mp4') ? 'mp4' : 'webm'; 37 const videoContent = `<video controls autoplay><source src="${videoUrl}" type="video/${ext}"></video>`; 38 Overlay.open(videoContent); 39 }); 40 }); 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.