User:Euphoria/common.js: Difference between revisions
Jump to navigation
Jump to search
(Blanked the page) Tag: Blanked |
No edit summary |
||
Line 1: | Line 1: | ||
// Load necessary module asynchronously | |||
mw.loader.using(['mediawiki.util']) | |||
.then(function () { | |||
// Select the dropdown, excluding items to be preserved | |||
$('.vector-menu-dropdown').find(':not(.preserve)').remove(); | |||
// 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' | |||
); | |||
}); |
Revision as of 06:48, 10 November 2023
// Load necessary module asynchronously
mw.loader.using(['mediawiki.util'])
.then(function () {
// Select the dropdown, excluding items to be preserved
$('.vector-menu-dropdown').find(':not(.preserve)').remove();
// 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'
);
});