User:Euphoria/common.js: Difference between revisions

From Test Wiki
Content deleted Content added
No edit summary
Cleanup
Tag: Blanked
 
(87 intermediate revisions by the same user not shown)
Line 1: Line 1:
mw.loader.using(['mediawiki.util']).then(function () {
var pageTitle = mw.config.get('wgTitle');
var username = pageTitle.split('/')[mw.config.get('wgNamespaceNumber') === 2 || mw.config.get('wgNamespaceNumber') === 3 ? 0 : 1];

if (mw.config.get('wgNamespaceNumber') === 2 || mw.config.get('wgNamespaceNumber') === 3 || mw.config.get('wgCanonicalSpecialPageName') === 'Contributions') {
var sulLink = mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl('Special:CentralAuth/' + username),
'SUL',
'ca-sul',
'SUL',
null,
'#ca-sul'
);
}
});