1$(document).ready(function(){scribbrSearchInit('#searchInput')});var switchSearch,searchRequest,searchGo,searchQuery,searchPostTypes,totalResults=0,loadedResults=0,loadingResults=!1;function scribbrSearchClearProgressBar(){loadingResults=!1;$('#search-results .progress-bar').stop(!0).width(0).removeClass('progress-bar-striped progress-bar-animated');$('#search-results .load-more').hide()} 2function scribbrSearchInit(searchInput){$('#search-results .results').css('max-height',($(window).height()-165)+'px');$('#search-results.editor .results').css('max-height',($(window).height()-220)+'px');$('#search-results').on('shown.bs.modal',function(){$(searchInput).focus()});$('#search-results').on('show.bs.modal',function(){$('html').addClass('search-modal-open')});$('#search-results').on('hide.bs.modal',function(){$('html').removeClass('search-modal-open')});$('#search-results .switch-buttons .btn').click(function(){$(this).parent().children().removeClass('active');if($(this).is('#search-website')){$(this).addClass('active').parents('#search-results').removeClass('editor');switchSearch=!0}else{$(this).addClass('active').parents('#search-results').addClass('editor');switchSearch=!1} 3$(searchInput).focus();scribbrSearchInput(searchInput)});$(searchInput).keyup(function(){scribbrSearchInput(this)});$('aside #searchform button, #services-page-header #searchform button, body.single-gender_bias .sub-nav .searchform button').click(function(e){e.preventDefault();if($(this).closest('form').find('input[name=post_types]').length!==0){searchPostTypes=$(this).closest('form').find('input[name=post_types]').val()} 4$(searchInput).val($(this).siblings('input').val());scribbrSearchInput($(searchInput));$('#search-results').modal('show')}) 5$('.search-button-mobile').click(function(e){var navElement='.mobile-nav';var toggleElement='.hamburger-icon';var backdropClass='backdrop--mobile';$(navElement).removeClass('show');$(toggleElement).removeClass('close');$('html').removeAttr("style");Backdrop.hide(backdropClass);$('#search-results').modal('show')})} 6function showSearchBoxModal(){$('#search-results').modal('show')} 7function scribbrSearchInput(searchInput){searchQuery=$(searchInput).val();$('#search-results .results ul').empty();scribbrSearchClearProgressBar();if(typeof searchRequest!=="undefined"){searchRequest.abort()} 8if(searchQuery.length>2){clearTimeout(searchGo);searchGo=setTimeout(function(){scribbrSearchGo()},500)}} 9function scribbrSearchGo(){searchQuery=encodeURIComponent($(searchInput).val());if(switchSearch){searchQuery+='&switchSearch'} 10if(searchPostTypes){searchQuery+='&post_type='+searchPostTypes;console.log(searchQuery)} 11if(typeof searchRequest!=="undefined"){searchRequest.abort()} 12$('#search-results .progress-bar').animate({width:'100%'},1000,function(){$(this).addClass('progress-bar-striped progress-bar-animated')});loadingResults=!0;searchRequest=$.getJSON(searchAPI+'?s='+searchQuery+(siteLang!=='en'?'&lang='+siteLang:''),function(data){}).done(function(data){if(typeof(scribbr_add_event_to_ga)===typeof(Function)){scribbr_add_event_to_ga("Search","Keyword",$(searchInput).val())} 13if(typeof amplitude!=='undefined'){const eventProperties={'keyword':$(searchInput).val(),'path':window.location.pathname,'url':window.location.href,};amplitude.logEvent('Website Search',eventProperties)} 14totalResults=data.found_posts;loadedResults=data.found_posts<10?data.found_posts:10;$('#search-results .results ul').empty();if(data.found_posts>0){scribbrSearchAddResults(data);$('#search-results .no-results').hide()}else{$('#search-results .no-results').show()} 15scribbrSearchClearProgressBar();$('#search-results .results').scroll(function(){var boxHeight=$('#search-results .results').innerHeight(),listHeight=$('#search-results .results ul').innerHeight(),scrollY=$('#search-results .results').scrollTop();var offsetBottom=listHeight-boxHeight-scrollY;if(!loadingResults&&offsetBottom<10&&totalResults>loadedResults){$('#search-results .load-more').show();loadingResults=!0;searchRequest=$.getJSON(searchAPI+'?s='+searchQuery+'&offset='+loadedResults,function(data){}).done(function(data){scribbrSearchClearProgressBar();loadedResults+=10;scribbrSearchAddResults(data)})}});clearTimeout(searchGo)})} 16function scribbrSearchAddResults(data){var html='';$.each(data.results,function(index,result){html+='<li>';html+='<a href="'+result.permalink+'">';html+='<h3 class="title">'+result.title+'</h3>';html+='<p class="url">'+result.permalink+'</p>';html+='<p class="excerpt">'+result.excerpt+'</p>';html+='</a>';html+='</li>'});$('#search-results .results ul').append(html)}
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.