1document.addEventListener( 2 "DOMContentLoaded", 3 function () 4 { 5 const clips = 6 document.querySelectorAll( 7 ".twitch-clip-item" 8 ); 9 10 const step = 4; 11 12 let visible = step; 13 14 clips.forEach( 15 (clip, index) => 16 { 17 if (index < visible) 18 { 19 clip.classList.add( 20 "visible" 21 ); 22 } 23 } 24 ); 25 26 const button = 27 document.getElementById( 28 "loadMoreClips" 29 ); 30 31 if (!button) 32 { 33 return; 34 } 35 36 button.addEventListener( 37 "click", 38 function () 39 { 40 visible += step; 41 42 clips.forEach( 43 (clip, index) => 44 { 45 if ( 46 index < visible 47 ) 48 { 49 clip.classList.add( 50 "visible" 51 ); 52 } 53 } 54 ); 55 56 if ( 57 visible >= clips.length 58 ) 59 { 60 button.style.display = 61 "none"; 62 } 63 } 64 ); 65 66 if ( 67 clips.length <= step 68 ) 69 { 70 button.style.display = 71 "none"; 72 } 73 } 74);
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.