// ChatterFix Global AI Assistant Auto-Inject (function() { if (document.getElementById('global-ai-assistant')) return; // Already loaded const script = document.createElement('script'); script.onload = function() { fetch('/global-ai/assistant-widget') .then(response => response.text()) .then(html => { const container = document.createElement('div'); container.innerHTML = html; document.body.appendChild(container.firstElementChild); }) .catch(error => console.warn('Could not load AI assistant:', error)); }; // Add the AI assistant automatically fetch('/global-ai/assistant-widget') .then(response => response.text()) .then(html => { const container = document.createElement('div'); container.innerHTML = html; document.body.appendChild(container.firstElementChild); }) .catch(error => console.warn('Could not load AI assistant:', error)); })();