User:Pppery/common.js

importScript("User:Pppery/purge.js"); importScript("User:Beetstra/Gadget-Spam-whitelist-Handler.js"); ConfirmRollback = "confirm"; importScript("User:Mr. Stradivarius/gadgets/ConfirmRollback.js"); $(function{	$('a.external').each(function{ var href = $(this).attr("href"); if(href.includes("wikipedia.org") || href.startsWith("/")){ $(this).removeClass("external"); }	});	setTimeout(function{ var x = $(".archived-section-prompt a"); if(x.length) { window.location = x.attr("href"); }		}, 1000); }); // Cleanup UI of unwanted block links (this can't be done in CSS since there is often stray HTML text to remove) $("a[href*=\"/wiki/Special:Block/\"]").each(function {	if($(this).parents(".mw-parser-output").length){		return;	}	var parent = $(this).parent;	if (parent.is("span:not(.mw-usertoollinks)")) {		var p = parent;		parent = p.parent;		p.remove;	} else {		$(this).remove;	}	parent = parent[0];	var h = parent.innerHTML;	h = h.replace(/ *\|? +\)/, ")");	h = h.replace(/\| +\|/, "|");	h = h.replace(/ +$/,"");	if (parent.innerHTML != h) {		parent.innerHTML = h;	} });