MediaWiki:Onyx.js

/* All JavaScript here will be loaded for users of the Onyx skin */

/* SocialProfile: Point social talk tabs to user talk */ $(function {	var namespace = mw.config.get('wgCanonicalNamespace');	if (namespace === 'UserProfile' || namespace === 'UserWiki') {		var talkTab = $('#onyx-actions-actionsList + a');		var talkUrl = talkTab.attr('href').replace('index.php?title=', ).replace(namespace, 'User').replace('?action=edit&redlink=1', );		var subIndex = talkUrl.indexOf('/', 1);		if (subIndex > 0)			talkUrl = talkUrl.substring(0, subIndex);		talkTab.attr('href', talkUrl);	} });