diff --git a/theme/ht_searcher.js b/theme/ht_searcher.js index d9ef0606b..460aa5128 100644 --- a/theme/ht_searcher.js +++ b/theme/ht_searcher.js @@ -476,16 +476,9 @@ window.search = window.search || {}; const branch = lang === 'en' ? 'master' : lang; const baseRemote = `https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/${branch}`; const remoteJs = `${baseRemote}/searchindex.js`; - const localJs = './searchindex.js'; + const localJs = '/searchindex.js'; const TIMEOUT_MS = 5_000; - /* ───────── helpers ───────── */ - const fetchWithTimeout = (url, opt = {}) => - Promise.race([ - fetch(url, opt), - new Promise((_, r) => setTimeout(() => r(new Error('timeout')), TIMEOUT_MS)) - ]); - const loadScript = src => new Promise((resolve, reject) => { const s = document.createElement('script');