User:Lil' Miss Rarity/thing.js

//Written by LMR //Please do not use!

var thing = {};

mainRoom.model.chats.bind("afteradd", function(o) {

var t = o.attributes.text; thing.parseEvent(t); });

thing.parseEvent = function(t) {

if (t.match(/fuck/gi)) {

thing.prepReply("Please do not swear here!"); } };

thing.prepReply = function(r) { $("textarea[name=message]").val(r); thing.sendReply; };

thing.sendReply = function {

var e        = jQuery.Event("keypress"); e.which  = 13; e.keyCode = 13;

$("textarea[name=message]").trigger(e); };