PageSourceSearch

https://www.streetpress.com/js/reading-progress.min.9e659e4661d176…33046c97debe6e74286cc9d567892b152c68e7c6.js

js streetpress.com collected 2026-09-24 17:46:33 UTC 1,080 bytes, 1 lines download raw bytes

1const computeNbWordsInParagraph=e=>e.innerText.trim().split(/\s+/).length,insertNbWordsInParagraphs=e=>e.forEach(e=>e.setAttribute("data-nb-words",computeNbWordsInParagraph(e))),computeReadingProgress=(e,t)=>{let n=0;for(const t of e){if(t.hasAttribute("is-on-screen"))break;n+=Number(t.getAttribute("data-nb-words"))}return n==t&&window.scrollY<window.innerHeight?0:100*n/t},scrollToProgress=(e,t)=>{if(t==0)return;const s=e.reduce((e,t)=>e+=Number(t.getAttribute("data-nb-words")),0),o=t*s/100;let n=0;for(const t of e){if(n>=o){t.scrollIntoView();return}n+=Number(t.getAttribute("data-nb-words"))}e[e.length-1].scrollIntoView()},setupReadingTracker=(e,t)=>{insertNbWordsInParagraphs(e);const n=e.reduce((e,t)=>e+=Number(t.getAttribute("data-nb-words")),0),s=new IntersectionObserver(s=>{s.forEach(e=>{e.isIntersecting?e.target.setAttribute("is-on-screen",!0):e.target.removeAttribute("is-on-screen")});const o=computeReadingProgress(e,n);t(o)},{root:null,rootMargin:"0px",threshold:.05});e.forEach(e=>s.observe(e))};window.readingProgress={setupReadingTracker,scrollToProgress}

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.