User:WikiDwarf/common.js: Difference between revisions

From Bharatpedia, an open encyclopedia
(Testing it works here)
Tag: Reverted
(Undo revision 303664 by WikiDwarf (talk))
Tag: Undo
Line 8: Line 8:
addPortletLink( 'p-tb', url, 'User rights', 't-userrights', 'List of user groups for ' + user );
addPortletLink( 'p-tb', url, 'User rights', 't-userrights', 'List of user groups for ' + user );
});
});
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Xiplus/TwinkleGlobal/load.js&action=raw&ctype=text/javascript');

Revision as of 12:45, 15 February 2022

/** userRights (for Bureaucrats only) **/
addOnloadHook( function() {
	if ( wgNamespaceNumber != 2 && wgNamespaceNumber != 3 ) { // User or User talk
		return;
	}
	var user = wgTitle.split( '/' )[0];
	var url = wgScript + '?title=Special:UserRights&user=' + encodeURIComponent( user );
	addPortletLink( 'p-tb', url, 'User rights', 't-userrights', 'List of user groups for ' + user );
});