User:Erutuon/scripts/hideUnwantedCategories.js

/*	Hides categories in the list at Special:WantedCategories if they are crossed out.

$(function {	var fullPageName = mw.config.get("wgPageName");	if (!(fullPageName === "Special:WantedCategories"	|| fullPageName === "Special:WantedTemplates"))		return;	mw.loader.using("oojs-ui").done(function  { var toHide; var hideText, showText; if (fullPageName === "Special:WantedCategories") { toHide = $("ol.special li").has("del"); hideText = "Hide crossed-out entries", showText = "Show crossed-out entries"; } else if (fullPageName === "Special:WantedTemplates") { toHide = $("ol.special li").filter(function (index, listItem) {		   	var templateLink = listItem.querySelector("a");				return templateLink && /^Template:tracking/.test(templateLink.textContent);			}); hideText = "Hide tracking templates", showText = "Show tracking templates"; }		toHide.hide; var hidden = true; var button = new OO.ui.ButtonWidget({			label: showText,		}); $("ol.special").before(button.$element); button.$element.click(function {			hidden = !hidden;			toHide.toggle;			button.setLabel(hidden ? showText : hideText);		}); }); });