User:Ultimate Dark Carnage/chat.js

window.ChatLink = window.ChatLink || function ChatLink{ this.$element = $('  '); this.loaded = false; this.active = false; this.hasSubmenus = false; return this; };

ChatLink.prototype.create = function create{ this.$element.attr('id', this.linkId); this.$element.find('> a').text(this.title); this.$element.addClass('ChatLink chat-link'); this.$element.find('> a').on('click', this.handler); if ($('#ChatHeader').find('.ChatHeaderLinks').length) $('#ChatHeader').find('.ChatHeaderLinks').append(this.$element); else { var $chat_nav = $(''); $chat_nav.html(this.$element); $('#ChatHeader h1.wordmark').after($chat_nav); } };