assets/js/academia-search.js
// Pre-process new search query.
Pre-process new search query.
Pre - process new search query .
function initSearch(force, fuse) {
  let query = $("#search-query").val();
  if ( query.length < 1) {
    $('#search-hits').empty();
  }
  if (!force && query.length < fuseOptions.minMatchCharLength)
    return;
  $('#search-hits').empty();
  searchacademia(query, fuse);
  let newURL = window.location.protocol + "//" + window.location.host + window.location.pathname + '?q=' + encodeURIComponent(query) + window.location.hash;
  updateURL(newURL);
}
function initSearch ( force , fuse ) { let query = $ ( "#search-query" ) . val ( ) ; if ( query . length < 1 ) { $ ( '#search-hits' ) . empty ( ) ; } if ( ! force && query . length < fuseOptions . minMatchCharLength ) return ; $ ( '#search-hits' ) . empty ( ) ; searchacademia ( query , fuse ) ; let newURL = window . location . protocol + "//" + window . location . host + window . location . pathname + '?q=' + encodeURIComponent ( query ) + window . location . hash ; updateURL ( newURL ) ; }
Pre-process new search query.
Pre - process new search query .
// If query deleted, clear results. // Check for timer event (enter key not pressed) and query less than minimum length required. // Do search.