User:HDMaster/chat.js

$('[name="message"]').keypress(function (e) {   if (e.which == 32 || e.which == 13) {        switch (this.value) {        case '/rules':            this.value = 'The Community Central chat rules can be found here.';            break;        case '/monstercat':            this.value = 'Monstercat is a Canadian electronic music record label from Vancouver. If you want to know more, go on Wikipedia or the wiki because I don\'t want to flood the chat.';            break;            case '/tou':            this.value = 'Wikia\'s Terms of Use can be found here.';            break;        }     } }); importArticles( {    type: 'script',     articles: [         'u:dev:CustomChatPings/code.js',     ] } );

importArticles({    type: 'script',     articles: [         'u:dev:ChatSendButton.js'     ] }); $(function {     $('.Rail').on('DOMNodeInserted', function(e) { if (e.target.id.indexOf('priv-user-') > -1) { $(' ')                 .attr({                      id: 'ping',                      src: 'http://vignette1.wikia.nocookie.net/test-z/images/c/cf/Ping.ogg',                      autoplay: true                  }) .appendTo('body'); }     });      $('.WikiaPage').on('DOMNodeInserted', function(e) { if (e.target.className.indexOf('Chat') > -1) { $('.Chat').not($('#Chat_' + window.roomId)).each(function {                 $(this).on('DOMNodeInserted', function { if ($(this).is(':hidden')/* || ($(this).is(':visible') && document.visibilityState == 'hidden')*/) { $(' ')                             .attr({                                  id: 'ping',                                  src: 'http://vignette1.wikia.nocookie.net/test-z/images/c/cf/Ping.ogg',                                  autoplay: true                              }) .appendTo('body'); }                 });              });          }      });  });

importScriptPage('ChatTimestamps/code.js','dev');