User:HDMaster/chat.js

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');