function handleSearchAttempt (e) {
    var _query;

    // If there's no index, exit immediately and re-initialise:
    if (typeof _links !== 'object' || !Array.isArray(_links) || !_links) { return init(); }

    // Prevent default submit behaviour
    typeof e !== 'undefined' && e.preventDefault();

    // Retrieve the search query from the input element
    _query = e.target.querySelector('input').value;

    // Suffice it to say that we should quit if there's no query
    if (typeof _query !== 'string' || !_query) { return; }

    displaySearchResults(_query, getSearchResults(_query, _links));
    return false;
  }
// Handle the submission of the search form
Handle the submission of the search form
Handle the submission of the search form
function handleSearchAttempt (e) {
    var _query;
    if (typeof _links !== 'object' || !Array.isArray(_links) || !_links) { return init(); }
    typeof e !== 'undefined' && e.preventDefault();
    _query = e.target.querySelector('input').value;
    if (typeof _query !== 'string' || !_query) { return; }
    displaySearchResults(_query, getSearchResults(_query, _links));
    return false;
  }
function handleSearchAttempt ( e ) { var _query ; if ( typeof _links !== 'object' || ! Array . isArray ( _links ) || ! _links ) { return init ( ) ; } typeof e !== 'undefined' && e . preventDefault ( ) ; _query = e . target . querySelector ( 'input' ) . value ; if ( typeof _query !== 'string' || ! _query ) { return ; } displaySearchResults ( _query , getSearchResults ( _query , _links ) ) ; return false ; }
Handle the submission of the search form
Handle the submission of the search form
// If there's no index, exit immediately and re-initialise: // Prevent default submit behaviour // Retrieve the search query from the input element // Suffice it to say that we should quit if there's no query