User:Cqm/chat.js

importScript('User:Joeytje50/chatmsg.js')

$('body').append(' '); var badwords = 'cunt|cock|fuck|dick|bitch|r.{0,2}tard|badword'; //add more pipe <|> seperated words to this list to expand. /* Run this when getting a new message */ onchatmessage = function(text, rawtext) { setTimeout(function {		/* Bad words beep */		if ($('.Chat ul li:last-child:not(.you):not(.inline-alert) .message .badword').length && $('.Chat ul li:last-child .message').html.match(new RegExp(badwords, 'i'))) {			$('#pingsound').html(' ');		} 	}, 20) /* Mark bad words */ text = text.replace((new RegExp('((^|>|('+badwords+'))[^<]+?)('+badwords+')','ig')), '$1 $4 '); return text; //DO NOT EDIT THIS LINE }