MediaWiki:UserActivityLink.js

/** * @Name           UserActivityLink * @Version        v1.0 * @Author(s)      TheGoldenPatrik1 * @Description    Adds a Special:UserActivity link to the global nav dropdown. */

(function {   if (window.UserActivityLinkLoaded) {        return;    }    window.UserActivityLinkLoaded = true;    importArticle({ type: 'script', article: 'u:dev:MediaWiki:I18n-js/code.js' });   mw.hook('dev.i18n').add(function(i18no) { $.when(           i18no.loadMessages('UserActivityLink'),            mw.loader.using('mediawiki.util')        ).then(function(i18n) {            $('.wds-global-navigation__user-menu div:nth-child(2) ul li:nth-child(2)').after( $('').append(                   $('', { 'data-id': 'activity', 'class': 'wds-global-navigation__dropdown-link', href: 'https://community.wikia.com/wiki/Special:UserActivity', text: i18n.msg('activity').plain })               )            );        });    }); });