diff --git a/theme/ai.js b/theme/ai.js
index 90dbb313c..bae463b88 100644
--- a/theme/ai.js
+++ b/theme/ai.js
@@ -136,6 +136,6 @@
function createFloatingButton(){ const d=document.createElement("div"); d.id="ht-ai-btn"; d.textContent="π€"; document.body.appendChild(d); return d; }
function createTooltip(btn){ const t=document.createElement("div"); t.id="ht-ai-tooltip"; t.textContent=TOOLTIP_TEXT; document.body.appendChild(t); btn.addEventListener("mouseenter",()=>{const r=btn.getBoundingClientRect(); t.style.left=`${r.left+r.width/2}px`; t.style.top=`${r.top}px`; t.classList.add("show");}); btn.addEventListener("mouseleave",()=>t.classList.remove("show")); }
- function createSidebar(){ const p=document.createElement("div"); p.id="ht-ai-panel"; p.innerHTML=`
`; document.body.appendChild(p); return p; }
+ function createSidebar(){ const p=document.createElement("div"); p.id="ht-ai-panel"; p.innerHTML=``; document.body.appendChild(p); return p; }
})();
\ No newline at end of file
diff --git a/theme/ht_searcher.js b/theme/ht_searcher.js
index 4da0f63d7..887ddd205 100644
--- a/theme/ht_searcher.js
+++ b/theme/ht_searcher.js
@@ -1,3 +1,26 @@
+/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
+ Polyfill so requestIdleCallback works everywhere (IE 11/Safari)
+ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
+if (typeof window.requestIdleCallback !== "function") {
+window.requestIdleCallback = function (cb) {
+ const start = Date.now();
+ return setTimeout(function () {
+ cb({
+ didTimeout: false,
+ timeRemaining: function () {
+ return Math.max(0, 50 - (Date.now() - start));
+ }
+ });
+ }, 1);
+};
+window.cancelIdleCallback = window.clearTimeout;
+}
+
+
+/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
+ search.js
+ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
+
"use strict";
window.search = window.search || {};
(function search(search) {
@@ -477,8 +500,7 @@ window.search = window.search || {};
`https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/refs/heads/${branch}/searchindex.js`;
const localJs = "/searchindex.js";
const TIMEOUT_MS = 10_000;
-
- /* helper: inject a