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');	if ($this.siblings('abbr.newpage').length < 1){		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(' | ' + (($this.siblings('abbr.newpage').length < 1) ? receditUndoLink + ' | ' : '') + receditEditLink); });