?> " }; if(typeof(liveChatConfig) !== 'undefined') { convConfigChat<?php echo esc_js($articleId); ?> = Livefyre.LFAPPS.lfExtend(liveChatConfig, convConfigChat<?php echo esc_js($articleId); ?> ); } Livefyre.require(['<?php echo LFAPPS_Chat::get_package_reference(); ?> '], function(ConvChat) { load_livefyre_auth(); new ConvChat(networkConfigChat, [convConfigChat<?php echo esc_js($articleId); ?> ], function(chatWidget) { if(typeof chatWidget !== "undefined") { var livechatListeners = Livefyre.LFAPPS.getAppEventListeners('livechat'); if(livechatListeners.length > 0) { for(var i=0; i<livechatListeners; i++)) { var livechatListener = livechatListeners[i]; chatWidget.on(livechatListener.eventName, livechatListener.callback); } }