...
Code Block | ||
---|---|---|
| ||
$(document).ready( function() { $.getScript("https://mywebsite.com/livechat/lib/livechatagentsdk.js") .then( function() { // Initialize the CTLive SDK return LIVECHATSDK.SDK.Initinit("https://mywebsite.com/livechat/") } ).then( function() { // InitializeLogin the agent to CTLive instance (in this example password is not required) return LIVECHATSDK.LIVECHAT.initlogin( { "nickname": "Agent1", "isAgent": true, "id": "USER_AGENT1", "channel": "web" } ); } ).catch( function(err) { console.error(err); } ); } ); |
...