Created
November 30, 2016 23:13
-
-
Save amirkhan81/0e584eea4c816b027b67be2f91369e86 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<script src="/scripts/dev/min/jquery.cookie-min.js"></script> | |
<img id="liveChat" src="/media/6015/lc-button3.png" | |
style="cursor: pointer; cursor:hand; position: fixed; left: 0; top: 300px; display: none; height: 140px; z-index: 999;" class="nonResponsive mobiHide" onclick="Velaro.Engagement.LoadPopoutChat()"> | |
<script type="text/javascript"> | |
jQuery(document).ready(function(){ | |
if (getCookie('chat_shown') != 'true') | |
{ | |
var timeout_show_chat = setTimeout('showChat()', 30*1000); | |
} | |
else | |
{ | |
showChat(); | |
} | |
}); | |
function showChat() | |
{ | |
if (jQuery('.yoursubdomain_floatbtn').css('display') == 'none' && getCookie('chat_shown') != 'true') | |
{ | |
setCookie('chat_shown', 'true', 60); | |
} | |
jQuery('style[data-type="csupport_preload"]').remove(); | |
} | |
function setCookie(c_name,value,exdays) | |
{ | |
var exdate=new Date(); | |
exdate.setDate(exdate.getDate() + exdays); | |
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); | |
document.cookie=c_name + "=" + c_value; | |
} | |
function getCookie(c_name) | |
{ | |
var i,x,y,ARRcookies=document.cookie.split(";"); | |
for (i=0;i<ARRcookies.length;i++) | |
{ | |
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("=")); | |
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1); | |
x=x.replace(/^\s+|\s+$/g,""); | |
if (x==c_name) | |
{ | |
return unescape(y); | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment