From 325310f6813ec12f005202c254a94b4f9d1cd1d8 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Mon, 28 Apr 2014 11:23:59 -0400 Subject: [PATCH] CC-5818: Fix Live Chat on Airtime Pro (2.5.3) --- .../public/js/airtime/common/livechat.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 airtime_mvc/public/js/airtime/common/livechat.js diff --git a/airtime_mvc/public/js/airtime/common/livechat.js b/airtime_mvc/public/js/airtime/common/livechat.js new file mode 100644 index 000000000..35801c697 --- /dev/null +++ b/airtime_mvc/public/js/airtime/common/livechat.js @@ -0,0 +1,18 @@ +var __lc = {}; +__lc.license = 1083735; + +function setupLiveChat() { + // this is where we pass custom variables to livechat; + // only pass the client id assigned by WHMCS for now + __lc.params = [ + { name: 'client_id', value: livechat_client_id } + ]; + + var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true; + lc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.livechatinc.com/tracking.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s); +} + +$(document).ready(function() { + setupLiveChat(); +}); \ No newline at end of file