User:Abelmoschus Esculentus/AjaxRollback.js

// //Modified from User:BenjaminWillJS/AjaxRollback.js jQuery(document).ready(function ($) {	function SetAjaxRollback {		$('span.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 + '[reverted]';});				},				error: function {					$rblink.text(function (i, val) {return val + '[rollback failed]';});				}			}); });	}	mw.loader.using(['mediawiki.util', 'mediawiki.api', 'mediawiki.Title', 'mediawiki.RegExp'], function { SetAjaxRollback; }); }); //