MediaWiki:Common.js: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 2:
'wgCanonicalNamespace',
'wgPageName',
]);
// 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.
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(
'Report a problem'▼
▲'Logs'
);
}
);
▲mw.util.addPortletLink(
▲'p-cactions',
▲'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'
);
}
);
}