User:UltimateSupreme/AjaxRollback.js

function SetAjaxRollback { $('.mw-rollback-link').click(function(e) { e.preventDefault; var $rblink = $(this); var href = this.getElementsByTagName('a')[0].href; this.innerHTML = ' '; $.ajax({ url: href, success: function { $rblink.text(function (i, val) {return val + ' [success]';}); loadPageData; }, error: function { $rblink.text(function (i, val) {return val + ' [failed]';}); loadPageData; } }); }); } addOnloadHook(SetAjaxRollback);