aboutsummaryrefslogtreecommitdiff
path: root/static/search.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/search.js')
-rw-r--r--static/search.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/static/search.js b/static/search.js
index e6adedf..6aa7019 100644
--- a/static/search.js
+++ b/static/search.js
@@ -165,7 +165,7 @@ Source:
- https://github.com/aaranxu/adidoks/blob/main/static/js/search.js
*/
(function(){
- //var index = elasticlunr.Index.load(window.searchIndex);
+ var lang = document.documentElement.getAttribute("lang");
var index;
searchinput.addEventListener('input', show_results, true);
suggestions.addEventListener('click', accept_suggestion, true);
@@ -173,7 +173,7 @@ Source:
async function show_results(){
var initIndex = async function () {
if (index === undefined) {
- index = fetch("/search_index.en.json")
+ index = fetch("/search_index." + lang + ".json")
.then(
async function(response) {
return await elasticlunr.Index.load(await response.json());