// Easy Category Deletion for EMPTY CATEGORIES (per [[WP:CSD#C1|CSD#C1]])
// Created by [[User:JamesR]]
// Navigate to the valid empty Category:* page and click on the "emptycat" tab to delete it instantly.
importScript('Wikipedia:WikiProject User scripts/Scripts/Add tab');
addOnloadHook(function (){
if (location.href.indexOf("&action=delete&catdel=yes") == -1) return; //Are we here to auto-edit the form?
//Modify the form
document.getElementById('wpReason').value = "[[WP:CSD#C1|C1]]: Empty category. ([[User:JamesR/catdelete.js|CatDel]])";
//Submit it!
document.getElementById('deleteconfirm').submit();
});
addOnloadHook(function (){
mw.util.addPortletLink("p-cactions", "http://en.wikipedia.org/w/index.php?title=Category%3A" + wgTitle + "&action=delete&catdel=yes", "emptycat", "emptycat", "Delete empty category");
});