@@ -2760,7 +2760,7 @@ ${item.displayPath}<span class="${type}">${name}</span>\
27602760 * @param {boolean } go_to_first
27612761 * @param {string } filterCrates
27622762 */
2763- async function showResults ( results , go_to_first , filterCrates ) {
2763+ async function showResults ( results , go_to_first , _filterCrates ) {
27642764 const search = searchState . outputElement ( ) ;
27652765 if ( go_to_first || ( results . others . length === 1
27662766 && getSettingValue ( "go-to-only-result" ) === "true" )
@@ -2815,9 +2815,7 @@ ${item.displayPath}<span class="${type}">${name}</span>\
28152815 }
28162816 }
28172817
2818- let crates = "" ;
2819-
2820- let output = `<h1 class="search-results-title">Results${ crates } </h1>` ;
2818+ let output = `<h1 class="search-results-title">Results</h1>` ;
28212819 if ( results . query . error !== null ) {
28222820 const error = results . query . error ;
28232821 error . forEach ( ( value , index ) => {
@@ -3879,17 +3877,19 @@ ${item.displayPath}<span class="${type}">${name}</span>\
38793877 }
38803878
38813879
3882- console . log ( rawSearchIndex ) ;
3883- let crates = "" ;
3880+ let crates = "Searching in " ;
38843881 if ( rawSearchIndex . size > 1 ) {
3885- crates = "<div id=\"crate-search-div\"> <select id=\"crate-search\">" +
3882+ crates + = "<select id=\"crate-search\">" +
38863883 "<option value=\"all crates\" selected>all crates</option>" ;
38873884 for ( const c of rawSearchIndex . keys ( ) ) {
3885+ console . log ( c ) ;
38883886 crates += `<option value="${ c } ">${ c } </option>` ;
38893887 }
3890- crates += "</select></div>" ;
3888+ crates += "</select>" ;
3889+ } else {
3890+ crates += rawSearchIndex . keys ( ) . next ( ) . value ;
38913891 }
3892- document . getElementById ( "search-focus-panel " ) . innerHTML = crates ;
3892+ document . getElementById ( "crate- search-div " ) . innerHTML = crates ;
38933893}
38943894
38953895if ( typeof window !== "undefined" ) {
0 commit comments