MediaWiki:Gadget-contributions.js: Difference between revisions

From RuneRealm Wiki
Jump to navigation Jump to search
Content added Content deleted
(Created page with "→‎* * Adds a contribution link on User, User talk and Contributions as a PortletLink * @author Jr_Mime: if (mw.config.get('wgNamespaceNumber') === 2 || mw.config.get('wgNamespaceNumber') === 3) { $(function () { 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' ); }); }")
 
No edit summary
Tag: Reverted
Line 6: Line 6:
if (mw.config.get('wgNamespaceNumber') === 2 || mw.config.get('wgNamespaceNumber') === 3) {
if (mw.config.get('wgNamespaceNumber') === 2 || mw.config.get('wgNamespaceNumber') === 3) {
$(function () {
$(function () {
mw.util.addPortletLink(
mw.mw.util.addPortletLink(
'p-namespaces',
'p-namespaces',
mw.util.getUrl('Special:Contributions/' + mw.config.get('wgRelevantUserName')),
mw.mw.util.getUrl('Special:Contributions/' + mw.config.get('wgRelevantUserName')),
'Contributions',
'Contributions',
'ca-nstab-contributions',
'ca-nstab-contributions',

Revision as of 00:10, 17 October 2024

/**
 * Adds a contribution link on User, User talk and Contributions as a PortletLink
 * @author Jr_Mime
 */

if (mw.config.get('wgNamespaceNumber') === 2 || mw.config.get('wgNamespaceNumber') === 3) {
	$(function () {
		mw.mw.util.addPortletLink(
			'p-namespaces',
			mw.mw.util.getUrl('Special:Contributions/' + mw.config.get('wgRelevantUserName')),
			'Contributions',
			'ca-nstab-contributions',
			'Click to open the user\'s contributions'
		);
	});
}