Fix JS error

This commit is contained in:
Guillaume Gomez 2025-04-02 11:14:38 +02:00
parent 2c382a58d3
commit 0ed1cbe486

View file

@ -3,7 +3,7 @@
/* global Mark, elasticlunr, path_to_root */ /* global Mark, elasticlunr, path_to_root */
window.search = window.search || {}; window.search = window.search || {};
(function search(search) { (function search() {
// Search functionality // Search functionality
// //
// You can use !hasFocus() to prevent keyhandling in your key // You can use !hasFocus() to prevent keyhandling in your key
@ -288,6 +288,9 @@ window.search = window.search || {};
// If reloaded, do the search or mark again, depending on the current url parameters // If reloaded, do the search or mark again, depending on the current url parameters
doSearchOrMarkFromUrl(); doSearchOrMarkFromUrl();
// Exported functions
config.hasFocus = hasFocus;
} }
function unfocusSearchbar() { function unfocusSearchbar() {
@ -521,6 +524,4 @@ window.search = window.search || {};
loadScript(path_to_root + '{{ resource "searchindex.js" }}', 'search-index'); loadScript(path_to_root + '{{ resource "searchindex.js" }}', 'search-index');
// Exported functions
search.hasFocus = hasFocus;
})(window.search); })(window.search);