1const dropdown = document.querySelector('.sort-dropdown'); 2const trigger = document.getElementById('sortTrigger'); 3const menu = document.getElementById('sortMenu'); 4const sortOptions = menu.querySelectorAll('.sort-option'); // â renamed 5 6trigger.addEventListener('click', (e) => { 7 e.stopPropagation(); 8 dropdown.classList.toggle('open'); 9}); 10 11// Close when clicking outside 12document.addEventListener('click', () => { 13 dropdown.classList.remove('open'); 14}); 15 16// Select option 17sortOptions.forEach(option => { 18 option.addEventListener('click', () => { 19 document.querySelector('.sort-label').textContent = option.textContent; 20 21 sortOptions.forEach(o => o.classList.remove('active')); 22 option.classList.add('active'); 23 24 dropdown.classList.remove('open'); 25 }); 26});
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.