1 function addActiveClassToUrls() { 2 var href = window.location.href; 3 var curUrl = new URL(window.location); 4 var pathname = curUrl.pathname; 5 $('a[href$="' + window.location.href + '"]').addClass('is-active'); 6 7 var path = "https://" + window.location.hostname + window.location.pathname; 8 $('a[href="' + path + '"]').addClass('is-active'); 9 $('a[href="' + pathname + '"]').addClass('is-active'); 10 $('a[href="' + window.location.href + '"]').addClass('is-active'); 11 } 12 13 function addActiveClassToLIs() { 14 $("a.is-active").each( function( index, ahref ) { 15 parent = $(ahref).parent(); 16 if (parent.prop("tagName") === "LI") { 17 parent.addClass("is-active"); 18 } 19 }); 20 } 21 22 $(document).ready(function () { 23 addActiveClassToUrls(); 24 addActiveClassToLIs(); 25 });
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.