Skip to content

Chat users window js refresh bugfix #8

@eggp

Description

@eggp

Hello! I modify ChatSettings.update_online_count method

update_online_count: function(){
var oc=jQuery("div#chat_buddylist").find("span.online_count").get(0);
var lastCount = parseInt(jQuery(oc).html());

jQuery.post(ajaxurl, {
                        action: 'bpchat_get_online_users_count',
                        'cookie': encodeURIComponent(document.cookie)
                        },
                  function(ret){
                      if(parseInt(ret) != lastCount)
                      {
                        jQuery(oc).html(ret);
                        ChatSettings.update_online_list();
                      }
            })//end of post
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions