User:This, that and the other/cleanupCleanup.js

// /* This, that and the other's Cleanup Cleanup script February 2012; updated May 2012

This script offers a quick way to remove tags that lack a reason= parameter. To use it, add the following two lines to your skin JavaScript file: importScript("MediaWiki:Gadget-morebits.js"); importScript("User:This, that and the other/cleanupCleanup.js");

$(function {	var para = document.createElement("p");	para.style.fontSize = "85%";	var link = document.createElement("a");	link.setAttribute("href", "#remove-cleanup");	link.textContent = "Remove this tag (if it lacks a reason)";	link.style.color = "maroon";	para.appendChild(link);	$("table.ambox-Cleanup td.mbox-text").append(para);	$(link).click(function { var page = new Morebits.wiki.page(wgPageName); page.setFollowRedirect(false); link.innerHTML = "Processing..."; // hack to remove onclick event handler page.load(function(pageobj) {			pageobj.setPageText(pageobj.getPageText.replace(/\{\{(Cleanup|Cleanup section|Cleanup-section|Clean-up section|Attention|Attention \(on talk page\)|Attention see talk|Attn|CU|Celan-up|Clean|Clean up|Clean-up|Cleancat|Cleanup-article|Cleanup-because|Cleanup-date|Cleanup-quality|Cleanup-reason|Cleanup-since|Clu|Cu|Improve|Index-cleanup|Quality|Spelling|Tidy)([^}]*)\}\}\n*/i, ""));			pageobj.setEditSummary("Removing tag without a reason (script-assisted edit)");			pageobj.save(function { location.reload; });		});	}); });

//