Skip to content

Commit dffc084

Browse files
committed
changed ai.js
1 parent a4e3f65 commit dffc084

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

theme/ai.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* HackTricks AI Chat Widget v1.16 – resizable sidebar
2+
* HackTricks AI Chat Widget v1.16 – resizable sidebar
33
* ---------------------------------------------------
44
* ❶ Markdown rendering + sanitised (same as before)
55
* ❷ NEW: drag‑to‑resize panel, width persists via localStorage
@@ -234,7 +234,9 @@
234234
/* =================================================================== */
235235
function injectStyles() {
236236
const css = `
237-
#ht-ai-btn{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);width:60px;height:60px;border-radius:50%;background:#1e1e1e;color:#fff;font-size:28px;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:99999;box-shadow:0 2px 8px rgba(0,0,0,.4);transition:opacity .2s}
237+
#ht-ai-btn{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);min-width:60px;height:60px;border-radius:30px;background:linear-gradient(45deg, #b31328, #d42d3f, #2d5db4, #3470e4);background-size:300% 300%;animation:gradientShift 8s ease infinite;color:#fff;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:99999;box-shadow:0 2px 8px rgba(0,0,0,.4);transition:opacity .2s;padding:0 20px}
238+
#ht-ai-btn span{margin-left:8px;font-weight:bold}
239+
@keyframes gradientShift{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
238240
#ht-ai-btn:hover{opacity:.85}
239241
@media(max-width:768px){#ht-ai-btn{display:none}}
240242
#ht-ai-tooltip{position:fixed;padding:6px 8px;background:#111;color:#fff;border-radius:4px;font-size:13px;white-space:pre-wrap;pointer-events:none;opacity:0;transform:translate(-50%,-8px);transition:opacity .15s ease,transform .15s ease;z-index:100000}
@@ -276,7 +278,7 @@
276278
function createFloatingButton() {
277279
const d = document.createElement("div");
278280
d.id = "ht-ai-btn";
279-
d.textContent = "🤖";
281+
d.innerHTML = "🤖<span>HackTricksAI</span>";
280282
document.body.appendChild(d);
281283
return d;
282284
}

0 commit comments

Comments
 (0)