MediaWiki:Gadget-contributions.js: Difference between revisions

From [N8]
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
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 Banri
  * @author Jr_Mime
  */
  */


(function ($, mw, gs) {
(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(

Latest revision as of 20:17, 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, gswiki);