Site assistant widget: plain divs instead of header/section (a site stylesheet that styles every header pushed the panel title down on Downline Banners), chat.js cache tag bumped; the shared chatbot test runs without a config.js or data volume (Stack POL)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-15 13:26:44 -06:00
parent 131cf542ad
commit f0c47bbf35
16 changed files with 22 additions and 22 deletions
+5 -5
View File
@@ -5,20 +5,20 @@
(function () {
if (window.__siteChat || /^\/admin/.test(location.pathname)) return;
window.__siteChat = 1;
var css = document.createElement('link'); css.rel = 'stylesheet'; css.href = '/assets/chat.css?v=20261115c'; document.head.appendChild(css);
var css = document.createElement('link'); css.rel = 'stylesheet'; css.href = '/assets/chat.css?v=20261115d'; document.head.appendChild(css);
var NAME = 'this site', TOPICS = [];
var root = document.createElement('div'); root.id = 'scChat';
root.innerHTML = '<button id="scBtn" type="button" aria-label="Ask a question" aria-expanded="false">'
+ '<svg viewBox="0 0 24 24" width="26" height="26" aria-hidden="true"><path fill="currentColor" d="M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H9l-5 4v-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm3 6.5a1.5 1.5 0 1 0 0 .01zm5 0a1.5 1.5 0 1 0 0 .01zm5 0a1.5 1.5 0 1 0 0 .01z"/></svg></button>'
+ '<section id="scPanel" role="dialog" aria-label="Questions" hidden>'
+ '<header class="sc-head"><div><b class="sc-title" id="scTitle">Ask a question</b><span class="sc-sub">Straight answers about this site and the network</span></div>'
+ '<button id="scClose" type="button" aria-label="Close">&times;</button></header>'
+ '<div id="scPanel" role="dialog" aria-label="Questions" hidden>'
+ '<div class="sc-head"><div><b class="sc-title" id="scTitle">Ask a question</b><span class="sc-sub">Straight answers about this site and the network</span></div>'
+ '<button id="scClose" type="button" aria-label="Close">&times;</button></div>'
+ '<div class="sc-msgs" id="scMsgs" aria-live="polite"></div>'
+ '<div class="sc-topics" id="scTopics"></div>'
+ '<form class="sc-input" id="scForm"><input id="scIn" autocomplete="off" maxlength="600" placeholder="Type your question" aria-label="Your question">'
+ '<button type="submit" id="scSend">Send</button></form>'
+ '<a class="sc-human" id="scHuman" href="https://instantadpay.com/support" target="_blank" rel="noopener">Need a person? Open network support</a>'
+ '</section>';
+ '</div>';
document.body.appendChild(root);
var $ = function (id) { return document.getElementById(id); };
var msgs = $('scMsgs'), input = $('scIn'), panel = $('scPanel'), btn = $('scBtn');