User:Euphoria/common.js: Difference between revisions

From Test Wiki
Content deleted Content added
No edit summary
No edit summary
Line 2: Line 2:
mw.loader.using(['mediawiki.util'])
mw.loader.using(['mediawiki.util'])
.then(function () {
.then(function () {
// Select the dropdown, excluding items to be preserved
// Preserve specific elements within the dropdown
$('.vector-menu-dropdown').find(':not(.preserve)').remove();
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
// Add a link to the 'p-cactions' portlet pointing to CentralAuth