1/* 2 3CollapsibleLists.js 4 5An object allowing lists to dynamically expand and collapse 6 7Created by Kate Morley - http://code.iamkate.com/ - and released under 8the terms of the CC0 1.0 Universal legal code: 9 10http://creativecommons.org/publicdomain/zero/1.0/legalcode 11 12*/ 13 14var CollapsibleLists=new function(){ 15this.apply=function(_1){ 16var _2=document.getElementsByTagName("ul"); 17for(var _3=0;_3<_2.length;_3++){ 18if(_2[_3].className.match(/(^| )collapsibleList( |$)/)){ 19this.applyTo(_2[_3],true); 20if(!_1){ 21var _4=_2[_3].getElementsByTagName("ul"); 22for(var _5=0;_5<_4.length;_5++){ 23_4[_5].className+=" collapsibleList"; 24} 25} 26} 27} 28}; 29this.applyTo=function(_6,_7){ 30var _8=_6.getElementsByTagName("li"); 31for(var _9=0;_9<_8.length;_9++){ 32if(!_7||_6==_8[_9].parentNode){ 33if(_8[_9].addEventListener){ 34_8[_9].addEventListener("mousedown",function(e){ 35e.preventDefault(); 36},false); 37}else{ 38_8[_9].attachEvent("onselectstart",function(){ 39event.returnValue=false; 40}); 41} 42if(_8[_9].addEventListener){ 43_8[_9].addEventListener("click",_a(_8[_9]),false); 44}else{ 45_8[_9].attachEvent("onclick",_a(_8[_9])); 46} 47_b(_8[_9]); 48} 49} 50}; 51function _a(_c){ 52return function(e){ 53if(!e){ 54e=window.event; 55} 56var _d=(e.target?e.target:e.srcElement); 57while(_d.nodeName!="LI"){ 58_d=_d.parentNode; 59} 60if(_d==_c){ 61_b(_c); 62} 63}; 64}; 65function _b(_e){ 66var _f=_e.className.match(/(^| )collapsibleListClosed( |$)/); 67var uls=_e.getElementsByTagName("ul"); 68for(var _10=0;_10<uls.length;_10++){ 69var li=uls[_10]; 70while(li.nodeName!="LI"){ 71li=li.parentNode; 72} 73if(li==_e){ 74uls[_10].style.display=(_f?"block":"none"); 75} 76} 77_e.className=_e.className.replace(/(^| )collapsibleList(Open|Closed)( |$)/,""); 78if(uls.length>0){ 79_e.className+=" collapsibleList"+(_f?"Open":"Closed"); 80} 81}; 82}(); 83
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.