User:Ultimate Dark Carnage/test.js

(function($, mw){   $('.Chat li').each(function{ if ($(this).hasClass('inline-alert') === false){ $(this).on('click', function(event){               $.showCustomModal( 'Delete message?', ' \                       Are you sure that you want to delete this message? \                   \                     \ Details \  \  \ User: \ ' + $(event.target).find(".user-name").text + ' \  \  \ Message: \ ' + $(event.target).find(".message").html + ' \  \  \ Time sent: \ ' + $(event.target).find(".time").text + ' \  \  \ ',                   {                        id: 'delete-msg-modal', width: 450, buttons: [ {                           id: 'cancel', message: 'No', handler: function{ $('#delete-msg-modal').closeModal; }                       },                        {                            id: 'submit', defaultButton: true, message: 'Yes', handler: function{ setInterval(function{                                   $('#delete-msg-modal').closeModal;                                }, 1000); $(event.target).remove; }                       }                        ]                    }                );            });        }    }); })(this.jQuery, this.mediaWiki);