1(function (Drupal) { 2 let initialized = false; 3 4 Drupal.behaviors.uxCoreAiBotAssistantSkip = { 5 attach(context) { 6 if (context !== document || initialized) { 7 return; 8 } 9 10 initialized = true; 11 if (addAssistantSkipClass(document)) { 12 return; 13 } 14 15 const observer = new MutationObserver((mutations) => { 16 for (const mutation of mutations) { 17 for (const node of mutation.addedNodes) { 18 if (node.nodeType === Node.ELEMENT_NODE && addAssistantSkipClass(node)) { 19 observer.disconnect(); 20 return; 21 } 22 } 23 } 24 }); 25 26 observer.observe(document.documentElement, { childList: true, subtree: true }); 27 }, 28 }; 29 30 function addAssistantSkipClass(root) { 31 const assistant = root.matches?.('ai-site-assistant') 32 ? root 33 : root.querySelector?.('ai-site-assistant'); 34 if (!assistant) { 35 return false; 36 } 37 38 assistant.classList.add('am-skip'); 39 return true; 40 } 41})(Drupal);
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.