MediaWiki:Chat.js

//Chat's topic. Remember to escape single quotes in the topic using \' to prevent this from breaking. var chatTopic = "Welcome to your new world!"  Rules  •  Emotes  •  Report a user ' $(function {	$('#ChatHeader .public.wordmark').prepend(''+chatTopic+' ')	.find('a').attr('style','position:relative;text-decoration:underline;') }) $('#ChatHeader .public.wordmark div:not(:first-child)').remove

/* Creating /me command */ document.getElementsByName('message')[0].onkeypress = function(e) { if (e.which == 32) { if (this.value == '/me' || this.value == '/ME') { this.value = '* '+wgUserName; }	} }

/*Mark admins*/ setInterval(function {	$('#Rail .User.chat-mod:not(.admin) .username').each(function { if (!this.innerHTML.match(/Abce2|Renardy|FusionXHelios5980|Titi and Co|Beybladerspirit29|Synchro37|Kululu12/)) { if (this.innerHTML.indexOf("SpanishBot") == -1 && this.innerHTML.indexOf("ManaBot") == -1){ $(this).parent.addClass('admin'); }else{ $(this).parent.addClass('bot'); }		}	}); }, 1000)

/*Allow Chat Mods and admins to kick users using /kick */ if (wgUserGroups.indexOf('chatmoderator')!=-1 || wgUserGroups.indexOf('sysop')!=-1) { $(function {	$('[name="message"]').keypress(function(e) { if (e.which == 13) { if (this.value.split(' ')[0] == '/kick') { e.preventDefault; var toKick = this.value.replace(/^\/kick /,'') if (!$('#WikiChatList [data-user="'+toKick+'"]').length) { confirm(toKick + ' is not in this chat. Still try to kick them?')?mainRoom.kick({name: toKick}):undefined; } else { mainRoom.kick({name: toKick}) }				this.value = ''; return true; }		}	}); }); }

var chatOptionsLoaded; if (chatOptionsLoaded != 1){ chatOptionsLoaded = 1; importScriptPage('MediaWiki:Chat.js/options.js'); }