MediaWiki:LinkToDiscussionsProfileIfTheyDontHaveLivePosts/code.js

if($('#UserProfileMasthead').length > 0 && $('#discussionAllPostsByUser').length == 0) { var id = $.getJSON(mw.util.wikiScript("api"), {		action: "query",		list: "users",		ususers: $('#UserProfileMasthead h1').text,		format: "json"	}).done(function(data) {		var id = data.query.users[0].userid;		$(".discussion-details > em, .discussion-label").wrapAll($("",		{			href:"/d/u/" + id 		}) );	}); }