Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//// my UI changes

// remove the Wikipedia logo to save space in the sidebar
// remove the ID so that the first portal menu heading is shown (see [[Phab:T268157]])
$('#p-logo').hide().removeAttr('id');

// remove the logout link to make things safer (and save space)
$('#pt-logout').hide();

// move the Mobile link to the end of the footer row
$('#footer-places-mobileview').appendTo('#footer-places')

// add some style so that the left panel headings stand out a bit -- black text over pale orange?
mw.util.addCSS('.vector-menu-portal .vector-menu-heading { background-color: cornsilk; color: black;}');

// use bull characters in hlists
mw.util.addCSS('.hlist li::after {content: " • " !important;} .hlist li:last-child::after {content: none !important;}');

// move main page link to the top of the tools menu
$('#p-tb > div > ul').prepend($('#n-mainpage-description'));

// create new "My pages" and "My gadgets" portlet menus at the top of the sidebar
"pages gadgets"
  .split(' ').forEach(function(p){
  $('#p-navigation').clone().attr('id', 'p-my-'+p).insertBefore('#p-navigation');
  $('#p-my-'+p+' .vector-menu-heading-label').text('My '+p);
  $('#p-my-'+p+'>div>ul').text('');
});

// add a set of my subpages to the "My pages" menu
mw.util.addPortletLink ('p-my-pages', '/wiki/User:GhostInTheMachine', 'HOME');

"All Drafts Help Misc Modules Other Layout Projects Scripts Test Tidying TidyingSD TODO WIP"
  .split(' ').forEach(function(p){
  mw.util.addPortletLink ('p-my-pages', '/wiki/User:GhostInTheMachine/' + p, '/ ' + p);
});

// add link to the "My gadgets" menu -- ⇑ go to top -- click -> scroll
$(mw.util.addPortletLink( 'p-my-gadgets', '#', String.fromCharCode(8657)+' go to top', 'p-my-gadgets-top', 'Go to the top'))
  .click(function(e){ e.preventDefault(); $('html, body').animate({scrollTop: 0}); });

// add link to the "My gadgets" menu -- / sub-pages -- real link
mw.util.addPortletLink('p-my-gadgets', mw.config.get('wgServer')+mw.config.get('wgArticlePath').replace("$1", "Special:PrefixIndex/"+mw.config.get('wgPageName')+"/"), '/ sub-pages');

// add link to the "My gadgets" menu -- ⇓ go to end -- click -> scroll
$(mw.util.addPortletLink( 'p-my-gadgets', '#', String.fromCharCode(8659)+' go to end', 'p-my-gadgets-end', 'Go to the end'))
  .click( function(e){ e.preventDefault(); $('html, body').animate({scrollTop: $(document).height()}); });

// hide some of the sidebar menus
"p-navigation p-interaction p-coll-print_export p-lang"
  .split(' ').forEach(function(p){
    $('#'+p).hide();
  });

// move assorted gadgets from their default menu into the "My gadgets" menu
// add a loader delay -- Twinkle seems very slow to load
mw.loader.using( 'ext.gadget.Twinkle', function () {
  "todo_add todo_view tw-lastdiff ca-make-sd-links us-majavah-align t-dumb-quotes ca-wping ca-AutoEd"
    .split(' ').forEach(function(p){
      ui_move_gadget(p, 20);
    });
});

// wait for the gadget "$1" to get loaded - retry $2 times with a delay of 100ms
function ui_move_gadget(id, safety) {
  console.log('ui_move_gadget '+id, safety);
  var $id = $('#' + id);
  if($id.length < 1 && safety > 0) {
    setTimeout(ui_move_gadget, 100, id, safety-1);
    return;
  }
  $id.appendTo('#p-my-gadgets > div > ul');
}