User:Writ Keeper/Scripts/historySection.js

$(document).ready(function {	var $autoLinkSearch = $(".diff-otitle span.autocomment>a");	if($autoLinkSearch.length > 0) 	{		var autoLink = $($autoLinkSearch[0]);		var regexResult = autoLink.attr("href").match(/\/wiki\/[^#]+(#.+)/);		if(regexResult.length > 0)		{			autoLink.attr("href", $("div#mw-diff-otitle1>strong>a").attr("href") + regexResult[1]);		}	}	$autoLinkSearch = $(".diff-ntitle span.autocomment>a");	if($autoLinkSearch.length > 0)	{		var autoLink = $($autoLinkSearch[0]);		var regexResult = autoLink.attr("href").match(/\/wiki\/[^#]+(#.+)/);		if(regexResult.length > 0)		{			autoLink.attr("href", $("div#mw-diff-ntitle1>strong>a").attr("href") + regexResult[1]);		}	} });