MediaWiki:Gadget-recentEditLinks.js

var editLinkPre = 'http://terraria.gamepedia.com/index.php?title='; $('li[class^="mw-line"] a[href$="&action=history"]').each(function{	var $this = $(this);   var receditTitle = $this.siblings('.mw-title').find('a.mw-changeslist-title').attr('title');    var receditDiff = $this.siblings('a[href*="&diff="]').attr('href');    var receditUndo = receditDiff        .replace(/&curid=.*?&/, '&')        .replace(/&diff=/, '&undo=')        .replace(/&oldid=/, '&undoafter=');    var receditUndoLink = 'undo';    var receditEditLink = 'edit';    $this.after(' | ' + receditUndoLink + ' | ' + receditEditLink); });