1import {CookieUtils} from 'sites/cookie_utils' 2 3function findChatbotContainer() { 4 return document.querySelector('web-chatbot')?.shadowRoot.querySelector('.chatbot-container') 5} 6 7document.addEventListener('clinch:trackable', () => { 8 const chatbotContainer = findChatbotContainer() 9 if (chatbotContainer) { 10 chatbotContainer.dataset.controller = 'chatbot--container' 11 } 12}) 13 14// Handles chatbot, message list and cookie when user rejects an implicit or previously accepted cookie 15document.addEventListener('clinch:untrackable', () => { 16 const chatbotContainer = findChatbotContainer() 17 if (chatbotContainer) { 18 chatbotContainer.removeAttribute('data-controller') 19 } 20 if (Cookies.get('chatbot_welcome_received')) { 21 Cookies.remove('chatbot_welcome_received', {domain: CookieUtils.getHostname()}) 22 } 23})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.