Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dump Mitel MiCollab Web Client Messages
jQuery('.chat-session').each(function() {
var session = jQuery($(this));
var other_name = session.find('.name').text();
session.find('.chat-messages').each(function() {
var list = jQuery($(this));
list.find('li').each(function() {
var list_item = jQuery($(this));
for(var i=0; i<list_item.length; i+=2) {
var name = (list_item.hasClass('chat-incoming') ? other_name : 'Me');
var headers = [];
list_item.children('.chat-message-header').each(function(){
headers.push( jQuery($(this)).text() );
});
var entries = [];
list_item.children('.chat-message-entry').each(function(){
entries.push( jQuery($(this)).text() );
});
for(var j=0; j<headers.length; j++) {
console.log(headers[j] + ' ' + name + ': ' + entries[j]);
}
}
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.