remove searchindex.json as it's not use anymore

This commit is contained in:
Carlos Polop 2025-04-21 00:12:01 +02:00
parent 6498d18687
commit 1ce03e414e
18 changed files with 19 additions and 90 deletions

View File

@ -47,10 +47,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -74,10 +74,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -75,10 +75,7 @@ jobs:
if [ -f "book/searchindex.js" ]; then
cp book/searchindex.js searchindex.js
fi
if [ -f "book/searchindex.json" ]; then
cp book/searchindex.json searchindex.json
fi
(git add searchindex.js searchindex.json;
(git add searchindex.js;
git commit -m "Update searchindex";
git push) || echo "No changes to searchindex.js"

View File

@ -475,9 +475,7 @@ window.search = window.search || {};
/* ───────── paths ───────── */
const branch = lang === 'en' ? 'master' : lang;
const baseRemote = `https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/${branch}`;
const remoteJson = `${baseRemote}/searchindex.json`;
const remoteJs = `${baseRemote}/searchindex.js`;
const localJson = './searchindex.json';
const localJs = './searchindex.js';
const TIMEOUT_MS = 5_000;
@ -497,16 +495,7 @@ window.search = window.search || {};
document.head.appendChild(s);
});
/* ───────── 1. remote JSON ───────── */
try {
const r = await fetchWithTimeout(remoteJson);
if (!r.ok) throw new Error(r.status);
return init(await r.json());
} catch (e) {
console.warn('Remote JSON failed →', e);
}
/* ───────── 2. remote JS ───────── */
/* ───────── 1. remote JS ───────── */
try {
await loadScript(remoteJs);
return init(window.search);
@ -514,16 +503,7 @@ window.search = window.search || {};
console.warn('Remote JS failed →', e);
}
/* ───────── 3. local JSON ───────── */
try {
const r = await fetch(localJson);
if (!r.ok) throw new Error(r.status);
return init(await r.json());
} catch (e) {
console.warn('Local JSON failed →', e);
}
/* ───────── 4. local JS ───────── */
/* ───────── 2. local JS ───────── */
try {
await loadScript(localJs);
return init(window.search);