User:Ursuul/wikia.js

//Adds a link to both your Blog in addition to your Contributions on the user drop-down menu on the top right //@Authors: Ozank Cx & Ursuul //Original Code: http://dev.wikia.com/wiki/MediaWiki:ContribsLink/code.js?oldid=46843

/** Blog Link **/ mw.loader.using('mediawiki.util', function {	if ($('a[data-id="blog"]').length || !$('.wds-global-navigation__content-bar').length) return;	var i18n = {		en: "My Blog",		es: "Mi Blog",		fr: "Mon Blog",		ko: "내 블로그",		zh: "我的博客",		nl: "Mijn Blog",		pl: "Mój Blog",		pt: "Meu Blog",		'pt-br': "Meu Blog",		ru: "Мой блог",		tr: "Bloğum"	};	i18n = i18n[mw.config.get("wgUserLanguage")] || i18n[mw.config.get("wgContentLanguage")] || i18n.en;	$('.wds-global-navigation__user-menu div:nth-child(2) ul li:nth-child(2)').after('' + i18n + ''); });

/** Contribs Link **/ mw.loader.using('mediawiki.util', function {	if ($('a[data-id="contributions"]').length || !$('.wds-global-navigation__content-bar').length) return;	var i18n = {		en: "My Contributions",		es: "Mis Contribuciones",		fr: "Mes contributions",		ko: "기여 목록",		zh: "我的貢獻",		nl: "Mijn bijdragen",		pl: "Moje edycje",		pt: "Minhas contribuições",		'pt-br': "Minhas contribuições",		ru: "Мои вклады",		tr: "Katkılarım"	};	i18n = i18n[mw.config.get("wgUserLanguage")] || i18n[mw.config.get("wgContentLanguage")] || i18n.en;	$('.wds-global-navigation__user-menu div:nth-child(3) ul li:nth-child(3)').after('' + i18n + ''); });