1const makeSubnavi = function(){ 2 document.addEventListener('DOMContentLoaded', function() { 3 title = document.querySelectorAll('.contents__title'); 4 if(title.length > 0){ 5 let i = 1; 6 let listWraper = document.querySelector('#js-anchor'); 7 8 title.forEach(items => { 9 let text = items.textContent; 10 let id = `p${i}`; 11 if(items.hasAttribute('id')) { 12 id = items.getAttribute('id'); 13 }else{ 14 items.setAttribute('id',id); 15 } 16 const listItem = document.createElement('li'); 17 listItem.innerHTML = `<a href="#${id}">${text}</a>`; 18 listWraper.appendChild(listItem); 19 i = i + 1; 20 }) 21 } 22 }) 23}
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.