0.1.81 • Published 5 years ago

ed24chat v0.1.81

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

#eDialog24 entrypoint script When loaded you initiate it by using

window.ed24ChatReady(function() {
     ed24Chat.setup(setupJSON);
})

It will setup iframes and communication between the iframes. To listen on messages that are sendt between the iframes you can use the function

ed24Chat.onMessages(function(data) {
    switch(data.type) {
        case 'OPEN_CHAT':
        //If chat is opened or not, contains boolean true false
        break;
        case 'ROUTE_CHANGED':
        //If the chat has navigated
        //Params: string
        //'init' //First chat step
        //'queue' //If the queue step is visible
        //'contact' //If the chat has contact with an operator
        //'end' //If the chat has ended
        break;
        case 'ENTRYPOINT_AVAILABILITY':
        //When the availability of a entrypoint changes
        break;
        case 'CHAT_RESET':
        //When the chat is ended and going back to the init step
        break;
        case 'START_CHAT':
        //When the chat is started
        break;
        case 'CHAT_READY':
        //Called when the chat is loaded inside the iframe
        break;
        case 'CLICK_MINIMIZE':
        //When the minimize button is clicked
        break;
        case 'CLICK_EXIT':
        //When the exit button is clicked
        break;
    }
})

And to send messages to the iframes you can use

window.ed24ChatSetupDone = function() {
ed24Chat.publishAction({type:'OPEN_CHAT', data:true});
};
0.1.81

5 years ago

0.1.80

5 years ago

0.1.79

5 years ago

0.1.78

5 years ago