1/** 2 * 3 */ 4 5console.debug('load subnav-filter.js'); 6 7var source = document.getElementById("entry-template").innerHTML; 8var template = Handlebars.compile(source); 9 10function loadElements() { 11 12 var $results = $('#results'); 13 14 $results.html(''); 15 16 window.data.forEach(function (el) { 17 18 console.debug('load elements', el); 19 20 for (var idx in el.naviPath) { 21 if (el.naviPath[idx].includes(selectedTag)) { 22 var html = template(el); 23 $results.append(html); 24 return; 25 } 26 } 27 }); 28 29} 30 31$(document).ready(function () { 32 33 34 $(".tag-subnavi .tag-link").click(function (ev) { 35 ev.preventDefault(); 36 console.debug('on tag click', this, ev); 37 38 $me = $(this); 39 40 $me.parents('.tag-subnavi').find('.tag-link').removeClass('active'); 41 42 $me.addClass('active'); 43 44 selectedTag = $me.data('slug'); 45 46 loadElements(); 47 48 history.pushState({ page: selectedTag }, $me.text(), $me.attr('href')); 49 50 return false; 51 }); 52 53 window.addEventListener("popstate", (event) => { 54 console.debug('history back', event, arguments); 55 selectedTag = event?.state?.page || aliasBaseTag; 56 57 $(".tag-subnavi .tag-link[data-slug=\""+ selectedTag +"\"]").focus().click(); 58 }); 59 60 loadElements(); 61 62});
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.