1jQuery( document ).ready(function() { 2 3 const list = document.querySelectorAll('#main-article h1, #main-article h2, #main-article h3'); 4 const sideList = document.getElementById('table-cont'); 5 6 for (var i = 0; i < list.length; i ++) 7 { 8 const listElementId = "list-element-" + i; 9 const newListElement = document.createElement("li"); 10 const newListElementLink = document.createElement("a"); 11 newListElementLink.innerHTML = list[i].outerHTML; 12 newListElement.setAttribute("class", "contents-list-item"); 13 newListElement.appendChild(newListElementLink); 14 newListElementLink.setAttribute("href", "#"); 15 16 17 18 19 list[i].setAttribute("id", listElementId); 20 21 sideList.appendChild(newListElement); 22 23 24 newListElementLink.onclick = function() 25 { 26 event.preventDefault(); 27 jQuery('html, body').animate({ 28 scrollTop: jQuery('#' + listElementId).offset().top - 45 29 }, 750); 30 }; 31 32 } 33 34});
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.