User:Callofduty4/wikia.js

function deleteInfo { var name = mw.config.get("wgTitle"); var userID = ""; if (mw.config.get("wgCanonicalNamespace") == "Special") { name = name.substring(14, name.length); }	$.ajax({		url: "http://community.wikia.com/api.php?action=query&list=allusers&aufrom=" + name + "&format=json",	}) .done(function(data) {		userID = data["query"]["allusers"][0].id;		$.ajax({ type: "POST", url: "http://community.wikia.com/wikia.php?controller=UserProfilePage&format=json&method=saveUserData", data: 'userId=' + userID + '&data={"name":"","location":"","occupation":"","gender":"","fbPage":null,"website":"","twitter":"","year":null,"month":"0","day":"0","hideEditsWikis":1}' });		$.ajax({ type: "POST", url: "http://community.wikia.com/wikia.php?controller=UserProfilePage&method=removeavatar&format=json", data: "avUser=" + name })		.done(function { window.location.reload(false); });	}); }

if (mw.config.get("wgCanonicalNamespace") == "User" || mw.config.get("wgCanonicalSpecialPageName") == "Contributions") {	$('.tabs').append('Clear Info'); }