Chú ý: Sau khi lưu thay đổi trang, bạn phải xóa bộ nhớ đệm của trình duyệt để nhìn thấy các thay đổi. Google Chrome, Firefox, Internet ExplorerSafari: Giữ phím ⇧ Shift và nhấn nút Reload/Tải lại trên thanh công cụ của trình duyệt. Để biết chi tiết và hướng dẫn cho các trình duyệt khác, xem Trợ giúp:Xóa bộ nhớ đệm.

//<nowiki>
//Modified from [[User:BenjaminWillJS/AjaxRollback.js]]
//Copied from [[User:Abelmoschus Esculentus/AjaxRollback.js]]
function ajaxrollback() {
	$('span.mw-rollback-link').click(function(e) {
		e.preventDefault();
		var $rblink = $(this);
		var href = $($(this).find('a')[0]).attr('href');
		$(this).html($('<span>').addClass('loader'));
		new mw.Api().postWithToken('rollback', {
			action: 'rollback',
			title: href.match(/(?<=(?:&|\?)title=).+?(?=&)/)[0],
			user: href.match(/(?<=(?:&|\?)from=).+?(?=&)/)[0],
			format: 'json'
		}).done(function() {
			$rblink.find('.loader').remove();
			$rblink.text(function (i, val) {
				return val + '✓';
			});
		}).fail(function() {
			$rblink.find('.loader').remove();
			$rblink.text(function (i, val) {
				return val + '✗';
			});
		});
	});
}

$.when($.ready).then(function () {
	if (!$('.mw-rollback-link')[0]) return;
	mw.loader.addStyleTag(`
		@keyframes loader {
			0%, 100% {
				content: "••• ";
			}
			25% {
				content: " •••";
			}
			50% {
				content: "• ••";
			}
			75% {
				content: "•• •";
			}
		}
		
		.loader::after {
			content: "";
			font-family: monospace, monospace;
			font-size: 0.6em;
			white-space: pre;
			animation: loader 0.5s infinite;
		}
	`);
	mw.hook('wikipage.content').add(ajaxrollback);
});