MediaWiki:Gadget-contributions.js: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
/** | /** | ||
* Adds a contribution link on User, User talk and Contributions as a PortletLink | * Adds a contribution link on User, User talk and Contributions as a PortletLink | ||
* @author | * @author Jr_Mime | ||
*/ | */ | ||
(function ($, mw, | (function ($, mw, rs) { | ||
if (mw.config.get('wgNamespaceNumber') === 2 || mw.config.get('wgNamespaceNumber') === 3) { | if (mw.config.get('wgNamespaceNumber') === 2 || mw.config.get('wgNamespaceNumber') === 3) { | ||
mw.util.addPortletLink( | mw.util.addPortletLink( | ||
| Line 14: | Line 14: | ||
); | ); | ||
} | } | ||
})(jQuery, mediaWiki, | })(jQuery, mediaWiki, rswiki); | ||
Revision as of 20:16, 7 March 2020
/**
* Adds a contribution link on User, User talk and Contributions as a PortletLink
* @author Jr_Mime
*/
(function ($, mw, rs) {
if (mw.config.get('wgNamespaceNumber') === 2 || mw.config.get('wgNamespaceNumber') === 3) {
mw.util.addPortletLink(
'p-namespaces',
mw.util.getUrl('Special:Contributions/' + mw.config.get('wgRelevantUserName')),
'Contributions',
'ca-nstab-contributions',
'Click to open the user\'s contributions'
);
}
})(jQuery, mediaWiki, rswiki);