Jump to content

MediaWiki:Common.js: Difference between revisions

no edit summary
(+ subpages, user rights)
No edit summary
Line 11:
mw.loader.using('mediawiki.util', function() {
 
// General usage pattern: mw.util.addPortletLink( portletId, href, text /* Optional: , id, tooltip, accesskey, nextnode */ );
 
// add logs for this page
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl('Special:Log/' + conf.wgPageName),
'Logs', ,
'Logs for this page');
 
// add extension-enabled report for the latest revision
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl('Special:Report/' + mw.config.get('wgCurRevisionId')),
'Report a problem',
'Report a ,problem');
'Report a problem');
 
// add list of subpages
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl('Special:UserRightsPrefixIndex/' + conf.wgPageName),
'Subpages',
'Report a problemSubpages');
 
// only do the following if in user namespace
if (conf.wgCanonicalNamespace == 'User') {
 
// add user rights
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl('Special:PrefixIndexUserRights/' + conf.wgPageName),
'SubpagesUser rights',
, 'User rights');
'Subpages');}
});
 
}
// only do the following if in user namespace
if (conf.wgCanonicalNamespace == 'User') {
 
// add user rights
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl('Special:UserRights/' + conf.wgPageName)
'User rights',
,
'User rights');
});
}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.