User:Euphoria/common.js: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
Cleanup Tag: Blanked |
||
| (103 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
// Load necessary module asynchronously |
|||
mw.loader.using(['mediawiki.util']) |
|||
.then(function () { |
|||
// Preserve specific elements within the dropdown |
|||
var $dropdown = $('.vector-menu-dropdown'); |
|||
var $preserve = $dropdown.find('.preserve'); |
|||
// Clear the dropdown and append the preserved elements |
|||
$dropdown.empty().append($preserve); |
|||
// 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' |
|||
); |
|||
}); |
|||