PageSourceSearch

https://learn.fabric-testbed.net/wp-content/plugins/ht-knowledge-base/dist/ht-kb-frontend.min.js?ver=3.3.0

js fabric-testbed.net collected 2026-10-03 21:38:10 UTC 8,359 bytes, 1 lines download raw bytes

1jQuery.fn.liveSearch=function(conf){var config=jQuery.extend({url:"/search-results.php?q=",id:"jquery-live-search",duration:400,typeDelay:200,triggerLength:4,loadingClass:"live-search-loading",onSlideUp:function(){},onShowLiveSearch:function(){},uptadePosition:!1,keepTypingPrompt:"keep typing"},conf),liveSearch=jQuery("#"+config.id);return liveSearch.length||(liveSearch=jQuery('<div id="'+config.id+'"></div>').appendTo(document.body).hide().slideUp(0),jQuery(document.body).click(function(event){var clicked=jQuery(event.target);clicked.is("#"+config.id)||clicked.parents("#"+config.id).length||clicked.is("input")||liveSearch.slideUp(config.duration,function(){config.onSlideUp()})})),this.each(function(){jQuery(this).bind("hideLiveSearch",function(){hideLiveSearch()});var input=jQuery(this).attr("autocomplete","off"),liveSearchPaddingBorderHoriz=parseInt(liveSearch.css("paddingLeft"),10)+parseInt(liveSearch.css("paddingRight"),10)+parseInt(liveSearch.css("borderLeftWidth"),10)+parseInt(liveSearch.css("borderRightWidth"),10),repositionLiveSearch=function(){var tmpOffset=input.offset(),inputDim={left:tmpOffset.left,top:tmpOffset.top,width:input.outerWidth(),height:input.outerHeight()};inputDim.topPos=inputDim.top+inputDim.height,inputDim.totalWidth=inputDim.width-liveSearchPaddingBorderHoriz,liveSearch.css({position:"absolute",left:inputDim.left+"px",top:inputDim.topPos+"px",width:inputDim.totalWidth+"px"})},showLiveSearch=function(){input.attr("aria-expanded","true"),jQuery(this).attr("aria-expanded","true"),jQuery("#s").attr("aria-expanded","true"),repositionLiveSearch(),jQuery(window).unbind("resize",repositionLiveSearch),jQuery(window).bind("resize",repositionLiveSearch),config.onShowLiveSearch(),liveSearch.slideDown(config.duration)},hideLiveSearch=function(){liveSearch.slideUp(config.duration,function(){config.onSlideUp(),input.attr("aria-expanded","false"),jQuery(this).attr("aria-expanded","false"),jQuery("#s").attr("aria-expanded","false")})};input.focus(function(){""!==this.value&&(""===liveSearch.html()?(this.lastValue="",input.keyup()):setTimeout(showLiveSearch,1))}).keyup(function(){if(0==this.value.length)return this.timer&&clearTimeout(this.timer),hideLiveSearch(),void(this.lastValue=this.value);if(this.value.length<=config.triggerLength)return this.timer&&clearTimeout(this.timer),liveSearch.html(config.keepTypingPrompt),showLiveSearch(),void(this.lastValue=this.value);if(this.value!=this.lastValue){input.addClass(config.loadingClass);var q=encodeURIComponent(this.value);this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){jQuery.get(config.url+q,function(data){input.removeClass(config.loadingClass),data.length&&q.length?(liveSearch.html(data),showLiveSearch()):hideLiveSearch()})},config.typeDelay),this.lastValue=this.value}})})},jQuery(document).ready(function($){"use strict";var hkbJSSettings=window.hkbJSSettings,hkbLiveSearchID="hkb-jquery-live-search",searchBox=$(".hkb-site-search__field").liveSearch({url:hkbJSSettings.liveSearchUrl,keepTypingPrompt:hkbJSSettings.keepTypingPrompt,id:hkbLiveSearchID,onShowLiveSearch:clearSelected,triggerLength:hkbJSSettings.triggerLength}),resultsElementSelector=".hkb-searchresults",currentElement=null,parentForm=searchBox.parents("form"),clearSelected=function(){null!=currentElement&&currentElement.removeClass("hkb-searchresults__current")};function scrollToCurrent(){var liveSearchEle=$("#"+hkbLiveSearchID),lsOffset=liveSearchEle.offset().top,lsHeight=liveSearchEle.height(),lsTotal=lsOffset+lsHeight,currentItem=(searchBox.height(),$(resultsElementSelector).find("li.hkb-searchresults__current")),currentOffset=null;currentOffset=void 0===currentItem?0:void 0===(currentOffset=currentItem.offset())?0:currentOffset.top;var selectedItemHeight=null;selectedItemHeight=void 0===currentItem?0:currentItem.height();var currentItemIndex=null;currentItemIndex=void 0===currentItem?0:currentItem.index();var selectedItemFullHeight=selectedItemHeight+currentOffset,currentScroll=liveSearchEle.scrollTop(),liveSearchCount=$(resultsElementSelector).children("li").length;0!==currentItemIndex?currentItemIndex+1!=liveSearchCount?selectedItemFullHeight>
1lsTotal?liveSearchEle.scrollTop(currentScroll+selectedItemHeight):currentOffset<lsOffset&&liveSearchEle.scrollTop(currentScroll-selectedItemHeight):liveSearchEle.scrollTop(lsHeight+2*selectedItemHeight):liveSearchEle.scrollTop(0)}searchBox.bind("keydown",function(e){switch(e.keyCode){case 9:return;case 40:e.preventDefault(),e.stopPropagation(),$(resultsElementSelector).css("display","block"),null===currentElement||currentElement.length<=0?currentElement=$(resultsElementSelector).find("li").first().addClass("hkb-searchresults__current"):(clearSelected(),currentElement=currentElement.next("li").length<=0?$(resultsElementSelector).find("li").first().addClass("hkb-searchresults__current"):currentElement.next("li").addClass("hkb-searchresults__current")),scrollToCurrent();break;case 38:e.preventDefault(),e.stopPropagation(),null===currentElement||currentElement.length<=0?currentElement=$(resultsElementSelector).find("li").last().addClass("hkb-searchresults__current"):(clearSelected(),currentElement=currentElement.prev("li").length<=0?$(resultsElementSelector).find("li").last().addClass("hkb-searchresults__current"):currentElement.prev("li").addClass("hkb-searchresults__current")),scrollToCurrent();break;case 13:if($(resultsElementSelector).find(".current").length>0&&(currentElement=$(resultsElementSelector).find(".hkb-searchresults__current")),null!==currentElement&&currentElement.length>0){e.preventDefault(),e.stopPropagation();var href=currentElement.find("a").first().attr("href");$(".hkb-searchresults").hide(),clearSelected(),currentElement=null,window.location.href=href;break}parentForm.first().submit();break;case 27:searchBox.trigger("hideLiveSearch")}}),hkbJSSettings.focusSearchBox&&(window.location.hash||jQuery(".hkb-site-search__field").focus())}),jQuery(document).ready(function($){"use strict";function enablePostVoting(){$(".ht-voting-links a").each(function(index){var voteActionAnchor=$(this),enabled=voteActionAnchor.hasClass("enabled"),targetDirection=voteActionAnchor.attr("data-direction"),targetType=voteActionAnchor.attr("data-type"),targetNonce=voteActionAnchor.attr("data-nonce"),targetID=voteActionAnchor.attr("data-id"),targetAllow=voteActionAnchor.attr("data-allow"),targetDisplay=voteActionAnchor.attr("data-display");voteActionAnchor.click(function(event){if(event.preventDefault(),enabled){var data={action:"ht_voting",direction:targetDirection,type:targetType,nonce:targetNonce,id:targetID,allow:targetAllow,display:targetDisplay};$.post(voting.ajaxurl,data,function(response){var commentArea;""!==response&&("post"==targetType?($("#ht-voting-post-"+targetID).replaceWith(response),(commentArea=$("#ht-voting-post-"+targetID).find(".ht-voting-comment").first()).hide(),commentArea.slideDown(500,function(){commentArea.find("textarea").focus()})):"comment"==targetType&&($("#ht-voting-comment-"+targetID).slideUp(500),$("#ht-voting-comment-"+targetID).replaceWith(response),$("#ht-voting-comment-"+targetID).slideDown(500)),enablePostVoting(),$(".ht-voting-comment").each(function(index){var voteCommentAnchor=$(this),targetVoteKey=voteCommentAnchor.attr("data-vote-key"),enabled=voteCommentAnchor.hasClass("enabled"),targetNonce=voteCommentAnchor.attr("data-nonce"),targetID=voteCommentAnchor.attr("data-id"),submitButton=voteCommentAnchor.children("button");submitButton.click(function(event){var feedback=voteCommentAnchor.children("textarea").val();if(event.preventDefault(),enabled){var data={action:"ht_voting_update_feedback",key:targetVoteKey,nonce:targetNonce,comment:feedback,id:targetID};$.post(voting.ajaxurl,data,function(response){voteCommentAnchor.slideUp(500,function(){""!==response&&voteCommentAnchor.html(response),voteCommentAnchor.slideDown(500)})})}else{var msg=$(".voting-login-required").attr("data-ht-voting-must-log-in-msg");alert(msg)}})}))})}else{var msg=$(".voting-login-required").attr("data-ht-voting-must-log-in-msg");alert(msg)}})})}enablePostVoting(),window.globalEnablePostVoting=function(){enablePostVoting()}}),jQuery(document).ready(function($){"use strict";$("a.hkb_widget_exit__btn").each(function(index){var link=$(this),linkTarget=link.attr("data-ht-kb-exit-href");link.attr("href",linkTarget)})});

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.