Skip to content

Commit 0bc4d15

Browse files
committed
fix search
1 parent b528bdd commit 0bc4d15

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

theme/ht_searcher.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,16 +476,9 @@ window.search = window.search || {};
476476
const branch = lang === 'en' ? 'master' : lang;
477477
const baseRemote = `https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/${branch}`;
478478
const remoteJs = `${baseRemote}/searchindex.js`;
479-
const localJs = './searchindex.js';
479+
const localJs = '/searchindex.js';
480480
const TIMEOUT_MS = 5_000;
481481

482-
/* ───────── helpers ───────── */
483-
const fetchWithTimeout = (url, opt = {}) =>
484-
Promise.race([
485-
fetch(url, opt),
486-
new Promise((_, r) => setTimeout(() => r(new Error('timeout')), TIMEOUT_MS))
487-
]);
488-
489482
const loadScript = src =>
490483
new Promise((resolve, reject) => {
491484
const s = document.createElement('script');

0 commit comments

Comments
 (0)