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
No edit summary
Line 2: Line 2:
'wgCanonicalNamespace',
'wgCanonicalNamespace',
'wgPageName',
'wgPageName',
'wgCurRevisionId'
]);
]);
// Add a link to the actions menu to Special:Log and Special:Report for this page.
// Only do the following not in the Special: namespace.
// Only do the following not in the Special: namespace.
if ( conf.wgCanonicalNamespace !== 'Special') {
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.loader.using( 'mediawiki.util', function () {
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl( 'Special:Log', { page : conf.wgPageName } ),
'Logs'
);
mw.util.addPortletLink(
mw.util.addPortletLink(
'p-cactions',
'p-cactions',
mw.util.getUrl( 'Special:Log', { page : conf.wgPageName } ),
mw.util.getUrl('Special:Report/' + mw.config.get('wgCurRevisionId')),
'Report a problem'
'Logs'
);
}
);
);
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl('Special:Report/' + mw.config.get('wgCurRevisionId'),
'Report a problem'
)

);

} );
}
}

Revision as of 02:02, 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'
	);
}
);
}