MediaWiki:ChatNotification.js

/** * ChatNotification.js * * Plays a sound whenever someone writes a message in the chat. * @author: User:Sinthoniel */ $(function {   if (mw.config.get('wgCanonicalSpecialPageName') == 'Chat') {        var notification_sound = new Audio('vignette4.wikia.nocookie.net/lotrminecraftmod/images/0/09/Chat_notification.ogg');        $('[name="message"]').keydown(function(e) { if (e.which == 13) { notification_sound.play; }       });    } });