User:Ultimate Dark Carnage/chat.js

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

/** var showStatsMenu = window.showStatsMenu || {}; showStatsMenu.init = function init{ this.you = mw.config.get('wgUserName', wgUserName); this.groups = mw.config.get('wgUserGroups', wgUserGroups); this.bind; };

showStatsMenu.bind = function bind{ var _ = this; setTimeout(this.createStats, 500); mainRoom.model.chats.bind('afteradd', function(child){       if (typeof window.mainRoom.roomId === 'undefined') return;        var $chatLi = $('#Chat_' + window.mainRoom.roomId + ' li[data-user]:last');        if ($chatLi.hasClass('inline-alert')) return;        $chatLi.find('> img.avatar').on('click', _.createUserStats(child.attributes.name));    }); };

showStatsMenu.createStats = function createStats{ var $chatLi = mainRoom.viewDiscussion.chatUL.find('> li'), _ = this; $chatLi.each(function(index){       var $this = $(this);        if ($this.hasClass('inline-alert')) return;        $this.find('> img.avatar').on('click', _.createUserStats($this.attr('data-user')));    }); };

showStatsMenu.createUserStats = function _create(user){ var _ = this; return function _createStats(event){ var $stats_menu = '', user_data = mainRoom.models.chats.findByName(user); $stats_menu += ''; $stats_menu += ''; $stats_menu += ''; $stats_menu += '' + user_data.attributes.name + ' '; $stats_menu += ' ' + user_data.attributes.editcount + ' edits '; }; };**/

// Random Commands var ChatTools = window.ChatTools || {}, STATUS_AWAY = 0; ChatTools.init = function init{ this.createTools({       'AFK': function afk{            va        },        'Options': function options{        }    }) };