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(o); });

thing.parseEvent = function(t) {

if (t == /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); };