1export const smoothscroll = () => { 2 const targetSelector = 'a[href^="#"]' 3 4 jQuery(document).on('click',targetSelector,function(e){ 5 let href = jQuery(this).attr("href"); 6 e.preventDefault(); 7 if(href!='#') { 8 let winH = document.documentElement.clientHeight 9 let speed = 600; 10 let target = href == '#pagetop' ? jQuery('body') : jQuery(href); 11 let targetY = target.offset().top 12 let padding = 0 13 14 if(target.length<1) return 15 16 if(targetY < winH - winH/3) { 17 padding = jQuery('.p-header').height() 18 } 19 20 let position = targetY - padding; 21 22 jQuery('body,html').stop(true,false).animate({ scrollTop: position }, speed, 'swing'); 23 } 24 }) 25}
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.