1// chat-hubspot.js 2// Usado en: 3// Toda la web, hace accesible el icono de abrir chat y cerrar chat 4// 5// ver 106 6// 7 8const OPEN_TITLE = "Abrir chat con nuestro equipo de asistencia comercial"; 9const CLOSE_TITLE = "Cerrar chat"; 10 11waiterChatHSWCAG = setInterval(function() { 12 const chatiframe = document.querySelector('iframe[title="Chat Widget"]') || 13 document.querySelector('iframe[aria-label="Chat Widget"]') || 14 document.querySelector('iframe[title="' + OPEN_TITLE + '"], iframe[title="' + CLOSE_TITLE + '"]'); 15 16 const chatdiv = document.querySelector('div[aria-label="Widget de chat"]')|| 17 document.querySelector('div[title="' + OPEN_TITLE + '"], div[title="' + CLOSE_TITLE + '"]'); 18 19 const isExpanded = document.querySelector(".hs-shadow-container.active") !== null; 20 21 if (chatiframe) { 22 if (isExpanded) { 23 chatiframe.setAttribute("title", CLOSE_TITLE); 24 chatiframe.setAttribute("aria-label", CLOSE_TITLE); 25 } else { 26 chatiframe.setAttribute("title", OPEN_TITLE); 27 chatiframe.setAttribute("aria-label", OPEN_TITLE); 28 } 29 } 30 31 if (chatdiv) { 32 if (isExpanded) { 33 chatdiv.setAttribute("title", CLOSE_TITLE); 34 chatdiv.setAttribute("aria-label", CLOSE_TITLE); 35 } else { 36 chatdiv.setAttribute("title", OPEN_TITLE); 37 chatdiv.setAttribute("aria-label", OPEN_TITLE); 38 } 39 } 40}, 1000) 41
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.