User:Ultimate Dark Carnage/chat.js

// Chat User Menu var enableUserMenu = true, avatarSize = 30;

$(document).ready(function{   var chat_li = $('.ChatWindow .Chat').find('li');    mainRoom.models.chats.bind('afteradd', function _bindMenu(child){ var avatarSrc = child.attributes.avatarSrc, name = child.attributes.name, since = child.attributes.since, $user_menu = $('  '), link = { profile: '/wiki/User: ', user_talk: '/wiki/User_talk: ', user_blog: '/wiki/User_blog: ', contributions: '/wiki/Special:Contributions/ ' };       $user_menu.find('> header').html(function{            var $avatar = $(' ').attr('src', avatarSrc.replace(/\/scale-to-width-down\/(\d+)/g, '/scale-to-width-down/' + avatarSize));            $avatar.addClass('user-avatar avatar');            var $username_cont = $('    ');            var _html = $username_cont.html;            _html = _html.replace(' ', name);            _html = _html.replace(' ', function createDate{ var _since = 'Member since  '; _since = _since.replace('', since.month); _since = _since.replace('', since.year); return _since; });           $username_cont.html(_html);            return [$avatar, $username_cont];        }); $user_menu.find('> nav').html(function{       }); }); });