User:BrickleBot/wikia.js

$(function { if (mw.config.get('wgCanonicalSpecialPageName') !== "Chat") return; var forAll = window.chatAnnouncementsAll, username, message, isInlineAlert; mainRoom.model.chats.bind("afteradd", function (child) { isInlineAlert = child.attributes.isInlineAlert == null ? false : true; if (!isInlineAlert && mainRoom.model.users.findByName(child.attributes.name) != null) { username = child.attributes.name; message = child.attributes.text; if ((mainRoom.model.users.findByName(username).attributes.isModerator || forAll) && /^\/announce /i.test(message)) { mainRoom.viewDiscussion.chatUL.children.last.remove; mainRoom.model.chats.add(new models.InlineAlert({text: mw.html.escape(message.slice(10))})); }	} }); });

$('.public').after('Online.')

importScriptPage('MediaWiki:ChatHacks.js','dev');