File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1- document . addEventListener ( 'DOMContentLoaded' , function ( ) {
1+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
22 var searchIndex = new FlexSearch . Index ( ) ; // Initialize FlexSearch
33 var index = { } ; // This will store the index data globally within this script block
44
55 // Fetch the generated JSON file
6- fetch ( '/wiki/search_index.json' )
6+ var indexPath = document . location . origin + "/search_index.json"
7+ fetch ( indexPath )
78 . then ( response => response . json ( ) )
89 . then ( data => {
910 index = data ; // Store the fetched data in the 'index' variable
@@ -52,6 +53,7 @@ document.addEventListener('DOMContentLoaded', function() {
5253 } ) ;
5354} ) ;
5455
56+
5557// Function to close the search overlay
5658function closeSearch ( ) {
5759 document . getElementById ( 'search_overlay' ) . style . display = 'none' ;
You can’t perform that action at this time.
0 commit comments