User:Euphoria/common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
mw.loader.using(['mediawiki.util']).then(function () { | mw.loader.using(['mediawiki.util']).then(function () { | ||
var pageTitle = mw.config.get('wgTitle'); | var pageTitle = mw.config.get('wgTitle'); | ||
var username; | 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( | var sulLink = mw.util.addPortletLink( | ||
'p-cactions', | 'p-cactions', | ||
mw.util.getUrl('Special:CentralAuth/' + username), | mw.util.getUrl('Special:CentralAuth/' + username), |