function showSavedQuery() {
  const queryResult = storeGet("srchResults");

  if (!queryResult) {
    return;
  }

  const books = keyInfo.getBooks();
  let html = "";

  //generate html for search hits
  for (let bid of books) {
    if (queryResult.data[bid]) {
      html += makeList(bid, queryResult.titleArray, queryResult.pageInfo, queryResult.data[bid]);
    }
  }
  $(".cmi-search-list").html(html);

  $(".search-message.header").text("Last Search Result");
  $(".search-message-body").html(`<p>Search for <em>${queryResult.query}</em> found ${queryResult.count} matches</p>`);
  $("#search-results-header").html(`: <em>${queryResult.query}</em>`);
}
//show saved query result in modal
show saved query result in modal
show saved query result in modal
function showSavedQuery() {
  const queryResult = storeGet("srchResults");
  if (!queryResult) {
    return;
  }
  const books = keyInfo.getBooks();
  let html = "";
  for (let bid of books) {
    if (queryResult.data[bid]) {
      html += makeList(bid, queryResult.titleArray, queryResult.pageInfo, queryResult.data[bid]);
    }
  }
  $(".cmi-search-list").html(html);
  $(".search-message.header").text("Last Search Result");
  $(".search-message-body").html(`<p>Search for <em>${queryResult.query}</em> found ${queryResult.count} matches</p>`);
  $("#search-results-header").html(`: <em>${queryResult.query}</em>`);
}
function showSavedQuery ( ) { const queryResult = storeGet ( "srchResults" ) ; if ( ! queryResult ) { return ; } const books = keyInfo . getBooks ( ) ; let html = "" ; for ( let bid of books ) { if ( queryResult . data [ bid ] ) { html += makeList ( bid , queryResult . titleArray , queryResult . pageInfo , queryResult . data [ bid ] ) ; } } $ ( ".cmi-search-list" ) . html ( html ) ; $ ( ".search-message.header" ) . text ( "Last Search Result" ) ; $ ( ".search-message-body" ) . html ( ` ${ queryResult . query } ${ queryResult . count } ` ) ; $ ( "#search-results-header" ) . html ( ` ${ queryResult . query } ` ) ; }
show saved query result in modal
show saved query result in modal
//generate html for search hits