User:Writ Keeper/Scripts/historyDeleter.js

$(document).ready(function {	if(mw.config.get("wgAction") == "view")	{		if($("li#ca-delete>a").length > 0)		{			var urlParam = $("li#ca-delete>a").attr("href").match(/&wpReason=[^&]+/);			if(urlParam != null)			{				$("li#ca-history>a").attr("href", $("li#ca-history>a").attr("href") + urlParam[0]);			}		}	}	if(mw.config.get("wgAction") == "history")	{		if($("li#ca-delete>a").length > 0)		{			var urlParam = $(location).attr("href").match(/&wpReason=[^&]+/);			if(urlParam != null)			{				$("li#ca-delete>a").attr("href", $("li#ca-delete>a").attr("href") + urlParam[0]);			}		}	} });