Last active
February 13, 2022 15:32
-
-
Save Brunomm/5c227e6c254332290812 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).on('page:load', runChat); | |
jQuery(document).ready(function($) {runChat();}); | |
/* Turbolinks >= 5.0 | |
jQuery(document).on('turbolinks:load', runChat); | |
*/ | |
// Chat online jivo | |
function runChat(){ | |
$('#jivo-iframe-container, .jivo_shadow, [src*="//code.jivosite"]').remove(); | |
delete(window.jivo_api); | |
delete(window.jivo_config); | |
window.jivo_magic_var = undefined; | |
window.$jivosite = null; | |
(function(d,s){ | |
var z = $jivosite=function(c){ z._.push(c) }, | |
el_script = z.s = d.createElement(s), | |
e=d.getElementsByTagName(s)[0], | |
jivo_id = 'ID-MY-ACCOUNT'; | |
z.set=function(o){ | |
z.set._.push(o) | |
}; | |
z._=[]; | |
z.set._=[]; | |
$.async = !0; | |
el_script.setAttribute("charset","utf-8"); | |
el_script.src='//code.jivosite.com/widget/'+jivo_id; | |
z.t=+new Date; | |
el_script.type="text/javascript"; | |
e.parentNode.insertBefore(el_script,e) | |
})(document,"script"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment