User:TheV1ct0ri0u5/ChatWarning

/* if (mw.config.get('wgCanonicalSpecialPageName') !== "Chat") return; var forAll = window.chatAnnouncementsAll, object, username, escapedUsername, message; mainRoom.model.chats.bind("afteradd", function (child) {	object = $('#entry-' + child.cid);	if (!object.hasClass('inline-alert')) {		username = object.attr('data-user');		escapedUsername = username.replace(/[!"#$%&'*+,.\/:;<=>?@\[\\\]^`{|}~]/g, '\\$&').replace(/ /g, "_");		message = object.children('.message').text.trim;		if (($("#WikiChatList #user-" + escapedUsername).hasClass('chat-mod') || forAll) && message.substr(0,10).match(/\/warn/i))			object.addClass('inline-alert custom-warning').removeClass('you continued') + mw.html.escape(message.substr(10)));	}	//make next post not invisible avatar if same user as announcement prior	if (!object.hasClass('custom-warning') && object.prev.hasClass('custom-warning'))		object.removeClass('continued'); }); }) (this.jQuery, this.mediaWiki);
 * Chat Warnings
 * Modified from Ozuzanna's Chat Announcements
 * (function($, mw) {