User:Euphoria/common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
mw.loader.using(['mediawiki.util']) | mw.loader.using(['mediawiki.util']) | ||
.then(function () { | .then(function () { | ||
// Add a link to the 'p-cactions' portlet pointing to CentralAuth | // Add a link to the 'p-cactions' portlet pointing to CentralAuth | ||
var sulLink = mw.util.addPortletLink( | var sulLink = mw.util.addPortletLink( |
Revision as of 06:51, 10 November 2023
// Load necessary module asynchronously
mw.loader.using(['mediawiki.util'])
.then(function () {
// Add a link to the 'p-cactions' portlet pointing to CentralAuth
var sulLink = mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl('Special:CentralAuth/' + mw.user.getName()),
'SUL',
'ca-sul',
'SUL',
null,
'#ca-sul'
);
});