MediaWiki:Common.js: Difference between revisions

The most up-to-date image and information guide on Webkinz Classic items, events, and more!
Content added Content deleted
No edit summary
(stop cascading, maybe?)
Line 8: Line 8:
// Add a link to the actions menu to Special:Log and Special:Report for this page.
// Add a link to the actions menu to Special:Log and Special:Report for this page.
mw.loader.using( 'mediawiki.util', function () {
mw.loader.using( 'mediawiki.util', function () {
mw.util.addPortletLink(
mw.util.addPortletLink( 'p-cactions', mw.util.getUrl( 'Special:Log', { page : conf.wgPageName } ), 'Logs' );
mw.util.addPortletLink( 'p-cactions', mw.util.getUrl('Special:Report/' + mw.config.get('wgCurRevisionId')), 'Report a problem' );
'p-cactions',
mw.util.getUrl( 'Special:Log', { page : conf.wgPageName } ),
'Logs'
);
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl('Special:Report/' + mw.config.get('wgCurRevisionId')),
'Report a problem'
);
}
}
);
);

Revision as of 04:22, 11 March 2023

var conf = mw.config.get([
    'wgCanonicalNamespace',
    'wgPageName',
]);
// Only do the following not in the Special: namespace. 
if ( conf.wgCanonicalNamespace !== 'Special') {

// Add a link to the actions menu to Special:Log and Special:Report for this page.
mw.loader.using( 'mediawiki.util', function () {
	mw.util.addPortletLink(	'p-cactions',	mw.util.getUrl( 'Special:Log', { page : conf.wgPageName } ),	'Logs'	);
mw.util.addPortletLink(	'p-cactions',	mw.util.getUrl('Special:Report/' + mw.config.get('wgCurRevisionId')),	'Report a problem'	);
}
);
}