1(function(){'use strict';var section=document.querySelector('.arv-photos');if(!section){return} 2var search=section.querySelector('[data-arv-photos-search]');var by=section.querySelector('[data-arv-photos-by]');var count=section.querySelector('[data-arv-photos-count]');var grid=section.querySelector('[data-arv-photos-grid]');if(!grid||(!search&&!by)){return} 3var cards=Array.prototype.slice.call(grid.children);function apply(){var q=search?search.value.trim().toLowerCase():'';var wantBy=by?by.value:'';var shown=0;for(var i=0;i<cards.length;i++){var card=cards[i];var race=card.getAttribute('data-arv-photos-race')||'';var shooters=card.getAttribute('data-arv-photos-by')||'';var hit=(''===q||race.indexOf(q)!==-1||shooters.indexOf(q)!==-1)&&(''===wantBy||shooters.indexOf(wantBy)!==-1);card.hidden=!hit;if(hit){shown++}} 4if(count){count.textContent=(''===q&&''===wantBy)?'':shown+(1===shown?' race':' races')}} 5if(search){search.addEventListener('input',apply)} 6if(by){by.addEventListener('change',apply)}})()
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.