1document.addEventListener('DOMContentLoaded', function() { 2 // from stack overflow 3 (function(doc, win, undefined) { 4 var list = doc.querySelector('#list'); 5 var items = list.querySelectorAll('ul'); 6 7 for (var i = 0; len = items.length, i < len; i++) { 8 items[i].parentNode.className = 'collapse'; 9 } 10 11 addEvent( list, 'click', 12 function (e) { 13 e = e || window.event; 14 var from = e.target || e.srcElement; 15 if (!/^li$/i.test(from.nodeName) || !from.querySelectorAll('li').length) { 16 return true; 17 } 18 var expand = /collapse/i.test(from.className || ''); 19 from.setAttribute('class', expand ? 'expand' : 'collapse'); 20 } 21 ); 22 23 function addEvent(element, myEvent, fnc) { 24 return ((element.attachEvent) 25 ? element.attachEvent('on' + myEvent, fnc) 26 : element.addEventListener(myEvent, fnc, false)); 27 } 28 29 }(document, window)) 30 31 // init syntax highlighting 32 hljs.initHighlightingOnLoad(); 33 34}, false);
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.