1 2/* 3 Callback function that is called immediately after JivoChat is loaded 4*/ 5function jivo_onLoadCallback(){ 6 // Create a DIV element for the label 7 window.jivo_cstm_widget = document.createElement('div'); 8 jivo_cstm_widget.setAttribute('id', 'jivo_custom_widget'); 9 document.body.appendChild(jivo_cstm_widget); 10 11 // Adds handlers click on the icon - to maximize the window when clicked 12 jivo_cstm_widget.onclick = function(){ 13 jivo_api.open(); 14 } 15 16 // Change the CSS class if there are agents online 17 if (jivo_config.chat_mode == "online"){ 18 jivo_cstm_widget.setAttribute("class", "jivo_online"); 19 } 20 21 // Now you can show the user a shortcut 22 window.jivo_cstm_widget.style.display='block'; 23} 24 25/* 26 Callback function jivo_onOpen and jivo_onClose called whenever the chat window JivoChat is expanded or collapsed by the user or by the proactive invitations rule. 27*/ 28function jivo_onOpen(){ 29 // If chat is deployed - hide shortcut 30 if (jivo_cstm_widget) 31 jivo_cstm_widget.style.display = 'none'; 32} 33function jivo_onClose(){ 34 // If chat is minimized - show label 35 if (jivo_cstm_widget) 36 jivo_cstm_widget.style.display = 'block'; 37} 38 39 40 41// ФÑнкÑÐ¸Ñ Ð´Ð»Ñ Ð·Ð°Ð³ÑÑзки JivoChat и оÑкÑÑÑÐ¸Ñ 42 43let jivoChatLoaded = false; 44loadAndOpenJivoChat(); 45function loadAndOpenJivoChat() { 46 if (jivoChatLoaded) { 47 //jivo_api.open(); // ÐÑли ÑÐ°Ñ Ñже загÑÑжен, пÑоÑÑо оÑкÑÑваем 48 return; 49 } 50 51 const jivoCssPreload = document.createElement('link'); 52 jivoCssPreload.href = '/jivosite/jivosite.css'; 53 jivoCssPreload.rel = 'preload'; 54 jivoCssPreload.as = 'style'; 55 document.head.appendChild(jivoCssPreload); 56 57 // ÐодклÑÑаем CSS Ñайл 58 const jivoCss = document.createElement('link'); 59 jivoCss.href = '/jivosite/jivosite.css'; 60 jivoCss.rel = 'stylesheet'; 61 document.head.appendChild(jivoCss); 62 63 64 65 // ÐодклÑÑаем ÑкÑÐ¸Ð¿Ñ Ð²Ð¸Ð´Ð¶ÐµÑа JivoChat 66 const jivoScript = document.createElement('script'); 67 jivoScript.src = '//code.jivosite.com/widget/N7qr4aoC48'; 68 jivoScript.async = true; 69 70 jivoScript.onload = function () { 71 jivoChatLoaded = true; 72 73 // ÐобавлÑем задеÑÐ¶ÐºÑ Ð¿ÐµÑед оÑкÑÑÑием 74 //setTimeout(() => { 75 //if (typeof jivo_api !== 'undefined') { 76 //jivo_api.open(); // ÐÑкÑÑваем ÑÐ°Ñ 77 //} 78 //}, 2000); // 2 ÑекÑÐ½Ð´Ñ Ð´Ð»Ñ Ð¼Ð¾Ð±Ð¸Ð»ÑнÑÑ ÑÑÑÑойÑÑв 79 }; 80 81 document.body.appendChild(jivoScript); 82}
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.