mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
f
This commit is contained in:
parent
3b40ab6ab7
commit
0683e0376d
63
.github/workflows/build_master.yml
vendored
63
.github/workflows/build_master.yml
vendored
@ -43,7 +43,7 @@ jobs:
|
|||||||
&& sudo apt update \
|
&& sudo apt update \
|
||||||
&& sudo apt install gh -y
|
&& sudo apt install gh -y
|
||||||
|
|
||||||
- name: Publish search index release asset
|
- name: Push search index to hacktricks-searchindex repo
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
|
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
|
||||||
@ -51,43 +51,52 @@ jobs:
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
ASSET="book/searchindex.js"
|
ASSET="book/searchindex.js"
|
||||||
TAG="searchindex-en"
|
TARGET_REPO="HackTricks-wiki/hacktricks-searchindex"
|
||||||
TITLE="Search Index (en)"
|
FILENAME="searchindex-en.js"
|
||||||
|
|
||||||
if [ ! -f "$ASSET" ]; then
|
if [ ! -f "$ASSET" ]; then
|
||||||
echo "Expected $ASSET to exist after build" >&2
|
echo "Expected $ASSET to exist after build" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TOKEN="${PAT_TOKEN:-${GITHUB_TOKEN:-}}"
|
TOKEN="${PAT_TOKEN}"
|
||||||
if [ -z "$TOKEN" ]; then
|
if [ -z "$TOKEN" ]; then
|
||||||
echo "No token available for GitHub CLI" >&2
|
echo "No PAT_TOKEN available" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
export GH_TOKEN="$TOKEN"
|
|
||||||
|
|
||||||
# Delete the release if it exists
|
# Clone the searchindex repo
|
||||||
echo "Checking if release $TAG exists..."
|
git clone https://x-access-token:${TOKEN}@github.com/${TARGET_REPO}.git /tmp/searchindex-repo
|
||||||
if gh release view "$TAG" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
|
|
||||||
echo "Release $TAG already exists, deleting it..."
|
|
||||||
gh release delete "$TAG" --yes --repo "$GITHUB_REPOSITORY" --cleanup-tag || {
|
|
||||||
echo "Failed to delete release, trying without cleanup-tag..."
|
|
||||||
gh release delete "$TAG" --yes --repo "$GITHUB_REPOSITORY" || {
|
|
||||||
echo "Warning: Could not delete existing release, will try to recreate..."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sleep 2 # Give GitHub API a moment to process the deletion
|
|
||||||
else
|
|
||||||
echo "Release $TAG does not exist, proceeding with creation..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create new release (with force flag to overwrite if deletion failed)
|
cd /tmp/searchindex-repo
|
||||||
gh release create "$TAG" "$ASSET" --title "$TITLE" --notes "Automated search index build for master" --repo "$GITHUB_REPOSITORY" || {
|
git config user.name "GitHub Actions"
|
||||||
echo "Failed to create release, trying with force flag..."
|
git config user.email "github-actions@github.com"
|
||||||
gh release delete "$TAG" --yes --repo "$GITHUB_REPOSITORY" --cleanup-tag >/dev/null 2>&1 || true
|
|
||||||
sleep 2
|
# Compress the searchindex file
|
||||||
gh release create "$TAG" "$ASSET" --title "$TITLE" --notes "Automated search index build for master" --repo "$GITHUB_REPOSITORY"
|
cd "${GITHUB_WORKSPACE}"
|
||||||
}
|
gzip -9 -k -f "$ASSET"
|
||||||
|
|
||||||
|
# Show compression stats
|
||||||
|
ORIGINAL_SIZE=$(wc -c < "$ASSET")
|
||||||
|
COMPRESSED_SIZE=$(wc -c < "${ASSET}.gz")
|
||||||
|
RATIO=$(awk "BEGIN {printf \"%.1f\", ($COMPRESSED_SIZE / $ORIGINAL_SIZE) * 100}")
|
||||||
|
echo "Compression: ${ORIGINAL_SIZE} bytes -> ${COMPRESSED_SIZE} bytes (${RATIO}%)"
|
||||||
|
|
||||||
|
# Copy the .gz version to the searchindex repo
|
||||||
|
cd /tmp/searchindex-repo
|
||||||
|
cp "${GITHUB_WORKSPACE}/${ASSET}.gz" "${FILENAME}.gz"
|
||||||
|
|
||||||
|
# Stage the updated file
|
||||||
|
git add "${FILENAME}.gz"
|
||||||
|
|
||||||
|
# Commit with timestamp if there are changes
|
||||||
|
TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
|
||||||
|
git commit -m "Update searchindex files - ${TIMESTAMP}" || echo "No changes to commit"
|
||||||
|
|
||||||
|
# Push to master branch
|
||||||
|
git push origin master
|
||||||
|
|
||||||
|
echo "Successfully pushed searchindex files"
|
||||||
|
|
||||||
|
|
||||||
# Login in AWs
|
# Login in AWs
|
||||||
|
88
.github/workflows/translate_all.yml
vendored
88
.github/workflows/translate_all.yml
vendored
@ -129,7 +129,7 @@ jobs:
|
|||||||
git pull
|
git pull
|
||||||
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1)
|
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1)
|
||||||
|
|
||||||
- name: Publish search index release asset
|
- name: Push search index to hacktricks-searchindex repo
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
|
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
|
||||||
@ -137,31 +137,93 @@ jobs:
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
ASSET="book/searchindex.js"
|
ASSET="book/searchindex.js"
|
||||||
TAG="searchindex-${BRANCH}"
|
TARGET_REPO="HackTricks-wiki/hacktricks-searchindex"
|
||||||
TITLE="Search Index (${BRANCH})"
|
FILENAME="searchindex-${BRANCH}.js"
|
||||||
|
|
||||||
if [ ! -f "$ASSET" ]; then
|
if [ ! -f "$ASSET" ]; then
|
||||||
echo "Expected $ASSET to exist after build" >&2
|
echo "Expected $ASSET to exist after build" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TOKEN="${PAT_TOKEN:-${GITHUB_TOKEN:-}}"
|
TOKEN="${PAT_TOKEN}"
|
||||||
if [ -z "$TOKEN" ]; then
|
if [ -z "$TOKEN" ]; then
|
||||||
echo "No token available for GitHub CLI" >&2
|
echo "No PAT_TOKEN available" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
export GH_TOKEN="$TOKEN"
|
|
||||||
|
|
||||||
# Delete the release if it exists
|
# Clone the searchindex repo
|
||||||
if gh release view "$TAG" >/dev/null 2>&1; then
|
git clone https://x-access-token:${TOKEN}@github.com/${TARGET_REPO}.git /tmp/searchindex-repo
|
||||||
echo "Release $TAG already exists, deleting it..."
|
|
||||||
gh release delete "$TAG" --yes --repo "$GITHUB_REPOSITORY"
|
# Compress the searchindex file
|
||||||
|
gzip -9 -k -f "$ASSET"
|
||||||
|
|
||||||
|
# Show compression stats
|
||||||
|
ORIGINAL_SIZE=$(wc -c < "$ASSET")
|
||||||
|
COMPRESSED_SIZE=$(wc -c < "${ASSET}.gz")
|
||||||
|
RATIO=$(awk "BEGIN {printf \"%.1f\", ($COMPRESSED_SIZE / $ORIGINAL_SIZE) * 100}")
|
||||||
|
echo "Compression: ${ORIGINAL_SIZE} bytes -> ${COMPRESSED_SIZE} bytes (${RATIO}%)"
|
||||||
|
|
||||||
|
# Copy ONLY the .gz version to the searchindex repo (no uncompressed .js)
|
||||||
|
cp "${ASSET}.gz" "/tmp/searchindex-repo/${FILENAME}.gz"
|
||||||
|
|
||||||
|
# Commit and push with retry logic
|
||||||
|
cd /tmp/searchindex-repo
|
||||||
|
git config user.name "GitHub Actions"
|
||||||
|
git config user.email "github-actions@github.com"
|
||||||
|
git add "${FILENAME}.gz"
|
||||||
|
|
||||||
|
if git diff --staged --quiet; then
|
||||||
|
echo "No changes to commit"
|
||||||
|
else
|
||||||
|
git commit -m "Update ${FILENAME} from hacktricks-cloud build"
|
||||||
|
|
||||||
|
# Retry push up to 20 times with pull --rebase between attempts
|
||||||
|
MAX_RETRIES=20
|
||||||
|
RETRY_COUNT=0
|
||||||
|
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
||||||
|
if git push origin master; then
|
||||||
|
echo "Successfully pushed on attempt $((RETRY_COUNT + 1))"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
RETRY_COUNT=$((RETRY_COUNT + 1))
|
||||||
|
if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
|
||||||
|
echo "Push failed, attempt $RETRY_COUNT/$MAX_RETRIES. Pulling and retrying..."
|
||||||
|
|
||||||
|
# Try normal rebase first
|
||||||
|
if git pull --rebase origin master 2>&1 | tee /tmp/pull_output.txt; then
|
||||||
|
echo "Rebase successful, retrying push..."
|
||||||
|
else
|
||||||
|
# If rebase fails due to divergent histories (orphan branch reset), re-clone
|
||||||
|
if grep -q "unrelated histories\|refusing to merge\|fatal: invalid upstream\|couldn't find remote ref" /tmp/pull_output.txt; then
|
||||||
|
echo "Detected history rewrite, re-cloning repository..."
|
||||||
|
cd /tmp
|
||||||
|
rm -rf searchindex-repo
|
||||||
|
git clone https://x-access-token:${TOKEN}@github.com/${TARGET_REPO}.git searchindex-repo
|
||||||
|
cd searchindex-repo
|
||||||
|
git config user.name "GitHub Actions"
|
||||||
|
git config user.email "github-actions@github.com"
|
||||||
|
|
||||||
|
# Re-copy ONLY the .gz version (no uncompressed .js)
|
||||||
|
cp "${ASSET}.gz" "${FILENAME}.gz"
|
||||||
|
|
||||||
|
git add "${FILENAME}.gz"
|
||||||
|
git commit -m "Update ${FILENAME}.gz from hacktricks-cloud build"
|
||||||
|
echo "Re-cloned and re-committed, will retry push..."
|
||||||
|
else
|
||||||
|
echo "Rebase failed for unknown reason, retrying anyway..."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create new release
|
sleep 1
|
||||||
gh release create "$TAG" "$ASSET" --title "$TITLE" --notes "Automated search index build for $BRANCH" --repo "$GITHUB_REPOSITORY"
|
else
|
||||||
|
echo "Failed to push after $MAX_RETRIES attempts"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Login in AWs
|
# Login in AWS
|
||||||
- name: Configure AWS credentials using OIDC
|
- name: Configure AWS credentials using OIDC
|
||||||
uses: aws-actions/configure-aws-credentials@v3
|
uses: aws-actions/configure-aws-credentials@v3
|
||||||
with:
|
with:
|
||||||
|
@ -21,19 +21,48 @@
|
|||||||
try { importScripts('https://cdn.jsdelivr.net/npm/elasticlunr@0.9.5/elasticlunr.min.js'); }
|
try { importScripts('https://cdn.jsdelivr.net/npm/elasticlunr@0.9.5/elasticlunr.min.js'); }
|
||||||
catch { importScripts(abs('/elasticlunr.min.js')); }
|
catch { importScripts(abs('/elasticlunr.min.js')); }
|
||||||
|
|
||||||
/* 2 — load a single index (remote → local) */
|
/* 2 — decompress gzip data */
|
||||||
|
async function decompressGzip(arrayBuffer){
|
||||||
|
if(typeof DecompressionStream !== 'undefined'){
|
||||||
|
/* Modern browsers: use native DecompressionStream */
|
||||||
|
const stream = new Response(arrayBuffer).body.pipeThrough(new DecompressionStream('gzip'));
|
||||||
|
const decompressed = await new Response(stream).arrayBuffer();
|
||||||
|
return new TextDecoder().decode(decompressed);
|
||||||
|
} else {
|
||||||
|
/* Fallback: use pako library */
|
||||||
|
if(typeof pako === 'undefined'){
|
||||||
|
try { importScripts('https://cdn.jsdelivr.net/npm/pako@2.1.0/dist/pako.min.js'); }
|
||||||
|
catch(e){ throw new Error('pako library required for decompression: '+e); }
|
||||||
|
}
|
||||||
|
const uint8Array = new Uint8Array(arrayBuffer);
|
||||||
|
const decompressed = pako.ungzip(uint8Array, {to: 'string'});
|
||||||
|
return decompressed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 3 — load a single index (remote → local) */
|
||||||
async function loadIndex(remote, local, isCloud=false){
|
async function loadIndex(remote, local, isCloud=false){
|
||||||
let rawLoaded = false;
|
let rawLoaded = false;
|
||||||
if(remote){
|
if(remote){
|
||||||
|
/* Try ONLY compressed version from GitHub (remote already includes .js.gz) */
|
||||||
try {
|
try {
|
||||||
const r = await fetch(remote,{mode:'cors'});
|
const r = await fetch(remote,{mode:'cors'});
|
||||||
if (!r.ok) throw new Error('HTTP '+r.status);
|
if (r.ok) {
|
||||||
importScripts(URL.createObjectURL(new Blob([await r.text()],{type:'application/javascript'})));
|
const compressed = await r.arrayBuffer();
|
||||||
|
const text = await decompressGzip(compressed);
|
||||||
|
importScripts(URL.createObjectURL(new Blob([text],{type:'application/javascript'})));
|
||||||
rawLoaded = true;
|
rawLoaded = true;
|
||||||
} catch(e){ console.warn('remote',remote,'failed →',e); }
|
console.log('Loaded compressed from GitHub:',remote);
|
||||||
}
|
}
|
||||||
|
} catch(e){ console.warn('compressed GitHub',remote,'failed →',e); }
|
||||||
|
}
|
||||||
|
/* If remote (GitHub) failed, fall back to local uncompressed file */
|
||||||
if(!rawLoaded && local){
|
if(!rawLoaded && local){
|
||||||
try { importScripts(abs(local)); rawLoaded = true; }
|
try {
|
||||||
|
importScripts(abs(local));
|
||||||
|
rawLoaded = true;
|
||||||
|
console.log('Loaded local fallback:',local);
|
||||||
|
}
|
||||||
catch(e){ console.error('local',local,'failed →',e); }
|
catch(e){ console.error('local',local,'failed →',e); }
|
||||||
}
|
}
|
||||||
if(!rawLoaded) return null; /* give up on this index */
|
if(!rawLoaded) return null; /* give up on this index */
|
||||||
@ -62,26 +91,28 @@
|
|||||||
return local ? loadIndex(null, local, isCloud) : null;
|
return local ? loadIndex(null, local, isCloud) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
(async () => {
|
let built = [];
|
||||||
const htmlLang = (document.documentElement.lang || 'en').toLowerCase();
|
const MAX = 30, opts = {bool:'AND', expand:true};
|
||||||
const lang = htmlLang.split('-')[0];
|
|
||||||
const mainReleaseBase = 'https://github.com/HackTricks-wiki/hacktricks/releases/download';
|
|
||||||
const cloudReleaseBase = 'https://github.com/HackTricks-wiki/hacktricks-cloud/releases/download';
|
|
||||||
|
|
||||||
const mainTags = Array.from(new Set([\`searchindex-\${lang}\`, 'searchindex-en', 'searchindex-master']));
|
self.onmessage = async ({data}) => {
|
||||||
const cloudTags = Array.from(new Set([\`searchindex-\${lang}\`, 'searchindex-en', 'searchindex-master']));
|
if(data.type === 'init'){
|
||||||
|
const lang = data.lang || 'en';
|
||||||
|
const searchindexBase = 'https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-searchindex/master';
|
||||||
|
|
||||||
const MAIN_REMOTE_SOURCES = mainTags.map(tag => \`\${mainReleaseBase}/\${tag}/searchindex.js\`);
|
/* Remote sources are .js.gz (compressed), local fallback is .js (uncompressed) */
|
||||||
const CLOUD_REMOTE_SOURCES = cloudTags.map(tag => \`\${cloudReleaseBase}/\${tag}/searchindex.js\`);
|
const mainFilenames = Array.from(new Set(['searchindex-' + lang + '.js.gz', 'searchindex-en.js.gz']));
|
||||||
|
const cloudFilenames = Array.from(new Set(['searchindex-cloud-' + lang + '.js.gz', 'searchindex-cloud-en.js.gz']));
|
||||||
|
|
||||||
|
const MAIN_REMOTE_SOURCES = mainFilenames.map(function(filename) { return searchindexBase + '/' + filename; });
|
||||||
|
const CLOUD_REMOTE_SOURCES = cloudFilenames.map(function(filename) { return searchindexBase + '/' + filename; });
|
||||||
|
|
||||||
const indices = [];
|
const indices = [];
|
||||||
const main = await loadWithFallback(MAIN_REMOTE_SOURCES , '/searchindex.js', false); if(main) indices.push(main);
|
const main = await loadWithFallback(MAIN_REMOTE_SOURCES , '/searchindex-book.js', false); if(main) indices.push(main);
|
||||||
const cloud= await loadWithFallback(CLOUD_REMOTE_SOURCES, '/searchindex-cloud.js', true ); if(cloud) indices.push(cloud);
|
const cloud= await loadWithFallback(CLOUD_REMOTE_SOURCES, '/searchindex.js', true ); if(cloud) indices.push(cloud);
|
||||||
|
|
||||||
if(!indices.length){ postMessage({ready:false, error:'no-index'}); return; }
|
if(!indices.length){ postMessage({ready:false, error:'no-index'}); return; }
|
||||||
|
|
||||||
/* build index objects */
|
/* build index objects */
|
||||||
const built = indices.map(d => ({
|
built = indices.map(d => ({
|
||||||
idx : elasticlunr.Index.load(d.json),
|
idx : elasticlunr.Index.load(d.json),
|
||||||
urls: d.urls,
|
urls: d.urls,
|
||||||
cloud: d.cloud,
|
cloud: d.cloud,
|
||||||
@ -89,9 +120,10 @@
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
postMessage({ready:true});
|
postMessage({ready:true});
|
||||||
const MAX = 30, opts = {bool:'AND', expand:true};
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self.onmessage = ({data:q}) => {
|
const q = data.query || data;
|
||||||
if(!q){ postMessage([]); return; }
|
if(!q){ postMessage([]); return; }
|
||||||
|
|
||||||
const all = [];
|
const all = [];
|
||||||
@ -114,12 +146,16 @@
|
|||||||
all.sort((a,b)=>b.norm-a.norm);
|
all.sort((a,b)=>b.norm-a.norm);
|
||||||
postMessage(all.slice(0,MAX));
|
postMessage(all.slice(0,MAX));
|
||||||
};
|
};
|
||||||
})();
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
/* ───────────── 2. spawn worker ───────────── */
|
/* ───────────── 2. spawn worker ───────────── */
|
||||||
const worker = new Worker(URL.createObjectURL(new Blob([workerCode],{type:'application/javascript'})));
|
const worker = new Worker(URL.createObjectURL(new Blob([workerCode],{type:'application/javascript'})));
|
||||||
|
|
||||||
|
/* ───────────── 2.1. initialize worker with language ───────────── */
|
||||||
|
const htmlLang = (document.documentElement.lang || 'en').toLowerCase();
|
||||||
|
const lang = htmlLang.split('-')[0];
|
||||||
|
worker.postMessage({type: 'init', lang: lang});
|
||||||
|
|
||||||
/* ───────────── 3. DOM refs ─────────────── */
|
/* ───────────── 3. DOM refs ─────────────── */
|
||||||
const wrap = document.getElementById('search-wrapper');
|
const wrap = document.getElementById('search-wrapper');
|
||||||
const bar = document.getElementById('searchbar');
|
const bar = document.getElementById('searchbar');
|
||||||
@ -133,6 +169,7 @@
|
|||||||
icon.setAttribute('aria-label','Loading search …');
|
icon.setAttribute('aria-label','Loading search …');
|
||||||
icon.setAttribute('title','Search is loading, please wait...');
|
icon.setAttribute('title','Search is loading, please wait...');
|
||||||
|
|
||||||
|
|
||||||
const HOT=83, ESC=27, DOWN=40, UP=38, ENTER=13;
|
const HOT=83, ESC=27, DOWN=40, UP=38, ENTER=13;
|
||||||
let debounce, teaserCount=0;
|
let debounce, teaserCount=0;
|
||||||
|
|
||||||
@ -184,7 +221,7 @@
|
|||||||
else if([DOWN,UP,ENTER].includes(e.keyCode) && document.activeElement!==bar){const cur=list.querySelector('li.focus'); if(!cur) return; e.preventDefault(); if(e.keyCode===DOWN){const nxt=cur.nextElementSibling; if(nxt){cur.classList.remove('focus'); nxt.classList.add('focus');}} else if(e.keyCode===UP){const prv=cur.previousElementSibling; cur.classList.remove('focus'); if(prv){prv.classList.add('focus');} else {bar.focus();}} else {const a=cur.querySelector('a'); if(a) window.location.assign(a.href);}}
|
else if([DOWN,UP,ENTER].includes(e.keyCode) && document.activeElement!==bar){const cur=list.querySelector('li.focus'); if(!cur) return; e.preventDefault(); if(e.keyCode===DOWN){const nxt=cur.nextElementSibling; if(nxt){cur.classList.remove('focus'); nxt.classList.add('focus');}} else if(e.keyCode===UP){const prv=cur.previousElementSibling; cur.classList.remove('focus'); if(prv){prv.classList.add('focus');} else {bar.focus();}} else {const a=cur.querySelector('a'); if(a) window.location.assign(a.href);}}
|
||||||
});
|
});
|
||||||
|
|
||||||
bar.addEventListener('input',e=>{ clearTimeout(debounce); debounce=setTimeout(()=>worker.postMessage(e.target.value.trim()),120); });
|
bar.addEventListener('input',e=>{ clearTimeout(debounce); debounce=setTimeout(()=>worker.postMessage({query: e.target.value.trim()}),120); });
|
||||||
|
|
||||||
/* ───────────── worker messages ───────────── */
|
/* ───────────── worker messages ───────────── */
|
||||||
worker.onmessage = ({data}) => {
|
worker.onmessage = ({data}) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user