[opt] search data path

This commit is contained in:
xaoxuu 2022-11-27 21:22:18 +08:00
parent 01aacad761
commit 6c21f081cd
1 changed files with 3 additions and 0 deletions

View File

@ -310,6 +310,9 @@ if (stellar.search.service) {
var $resultArea = document.querySelector("div#search-result");
$inputArea.focus(function() {
var path = stellar.search[stellar.search.service]?.path || '/search.xml';
if (!path.startsWith('/')) {
path = '/' + path;
}
const filter = $inputArea.attr('data-filter') || '';
searchFunc(path, filter, 'search-input', 'search-result');
});