1$.fn.selectGuide = function(guide) { 2 $("select", this).val(guide); 3}; 4 5var guidesIndex = { 6 bind: function() { 7 var currentGuidePath = window.location.pathname; 8 var currentGuide = currentGuidePath.substring(currentGuidePath.lastIndexOf("/")+1); 9 $(".guides-index-small"). 10 on("change", "select", guidesIndex.navigate). 11 selectGuide(currentGuide); 12 $(document).on("click", ".more-info-button", function(e){ 13 e.stopPropagation(); 14 if ($(".more-info-links").is(":visible")) { 15 $(".more-info-links").addClass("s-hidden").unwrap(); 16 } else { 17 $(".more-info-links").wrap("<div class='more-info-container'></div>").removeClass("s-hidden"); 18 } 19 }); 20 $("#guidesMenu").on("click", function(e) { 21 $("#guides").toggle(); 22 return false; 23 }); 24 $(document).on("click", function(e){ 25 e.stopPropagation(); 26 var $button = $(".more-info-button"); 27 var element; 28 29 // Cross browser find the element that had the event 30 if (e.target) element = e.target; 31 else if (e.srcElement) element = e.srcElement; 32 33 // Defeat the older Safari bug: 34 // http://www.quirksmode.org/js/events_properties.html 35 if (element.nodeType === 3) element = element.parentNode; 36 37 var $element = $(element); 38 39 var $container = $element.parents(".more-info-container"); 40 41 // We've captured a click outside the popup 42 if($container.length === 0){ 43 $container = $button.next(".more-info-container"); 44 $container.find(".more-info-links").addClass("s-hidden").unwrap(); 45 } 46 }); 47 }, 48 navigate: function(e){ 49 var $list = $(e.target); 50 var url = $list.val(); 51 window.location = url; 52 } 53};
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.