[fix] search

This commit is contained in:
xaoxuu 2022-12-15 12:59:39 +08:00
parent 0a3ee07fc4
commit b7efbc647e
1 changed files with 3 additions and 0 deletions

View File

@ -309,6 +309,9 @@ if (stellar.search.service) {
stellar.jQuery(() => {
stellar.loadScript('/js/search/local-search.js', { defer: true }).then(function () {
var $inputArea = $("input#search-input");
if ($inputArea.length == 0) {
return;
}
var $resultArea = document.querySelector("div#search-result");
$inputArea.focus(function() {
var path = stellar.search[stellar.search.service]?.path || '/search.json';