1let featured_collections = []; 2 3export default function init(){ 4 featured_collections = []; 5 document.querySelectorAll('#featured_collections li').forEach((e) => { 6 let styles = e.getElementsByClassName('featured_style'); 7 if (styles.length > 1){ 8 e.styles = styles; 9 e.current = 0; 10 e.n_styles = styles.length; 11 featured_collections.push(e); 12 for (let j = 0; j < e.styles.length; j++){ 13 e.styles[j].classList.remove('current'); 14 } 15 } 16 }); 17 if (featured_collections.length > 0){ 18 clearInterval(window.featured_styles_interval); 19 window.featured_styles_interval = setInterval(cycleFeaturedStyles, 2000); 20 } 21} 22 23function cycleFeaturedStyles(){ 24 featured_collections.forEach((e) => { 25 e.styles[e.current].classList.remove('current'); 26 e.current = (e.current + 1) % e.n_styles; 27 e.styles[e.current].classList.add('current'); 28 }); 29};
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.