Thread:Lenhi/@comment-26497423-20160508025505

// Send function var send = function(m) { mainRoom.socket.send(new models.ChatEntry({ roomId: this.roomId, name: mw.config.get('wgUserName'), text: m   }).xport); }; $(function {   if (mw.config.get('wgCanonicalSpecialPageName') != 'Chat' || !mainRoom.userMain.attributes.isModerator) return;    $('[name="message"]').keydown(function(e) { if (e.which == 13 && $(this).val.substr(0, 6) == '!notice') { $(this).val(''); send('This wiki is currently restricting those plot spoilers you just mentioned. Read here for the details!'); }   }); });  