1( function () { 2 'use strict'; 3 4 document.addEventListener( 'click', function ( event ) { 5 var link = event.target.closest( '.ptb-quicklinks__item' ); 6 if ( ! link ) { 7 return; 8 } 9 10 var targetId = link.getAttribute( 'href' ); 11 if ( ! targetId || targetId.charAt( 0 ) !== '#' ) { 12 return; 13 } 14 15 var target = document.getElementById( targetId.slice( 1 ) ); 16 if ( ! target ) { 17 return; // Let the browser fall back to default anchor behavior. 18 } 19 20 event.preventDefault(); 21 22 var reduceMotion = window.matchMedia( '(prefers-reduced-motion: reduce)' ).matches; 23 target.scrollIntoView( { 24 behavior: reduceMotion ? 'auto' : 'smooth', 25 block: 'start', 26 } ); 27 28 // Keep the URL/history and focus behavior consistent with a normal anchor jump. 29 if ( history.pushState ) { 30 history.pushState( null, '', targetId ); 31 } 32 target.setAttribute( 'tabindex', '-1' ); 33 target.focus( { preventScroll: true } ); 34 } ); 35} )();
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.