Sample Page

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.
//// Assorted changes to the "standard" display that suit me

// 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;}');

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

//// create and populate new menus

// 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 Help Misc Other Layout Projects Scripts Timeline"
  .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()}); });

// add link to the "My gadgets" menu -- Process this page with Refill
mw.util.addPortletLink('p-my-gadgets', "https://refill.toolforge.org/ng/result.php?page="+mw.config.get('wgPageName')+"&wiki=en&method-wiki=Fix%20page&noaccessdate=on", 'Refill');

// hide some of the standard 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-taavi-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');
}

//// assorted improvments to specific parts of the display

// increase the size of the coloured circles on individual items in the watchlist
mw.util.addCSS('.mw-rcfilters-ui-changesListWrapperWidget .mw-rcfilters-ui-highlights > div { width: 9px; height: 9px; }');

// open a gap under the page title to allow for gadgets
mw.util.addCSS('.mw-body .firstHeading {margin-top: 1em;}');

// highlight (current) lines in my contributions output (from VP by Redrose64)
mw.util.addCSS('li.mw-contributions-current { background-color: cornsilk; }');

// change colour for ORES warnings in the history list -- normal colour is too near to cornsilk used just above for current edit
mw.util.addCSS('.damaging.ores-highlight { background-color: bisque; }');

//  use columns for "Templates used" in editing preview — from [[Wikipedia:Village_pump_(idea_lab)#Presenting_'Templates_used_in_this_preview'_in_multi-column_format VP idea lab]] of 3 August 2025
mw.util.addCSS('.mw-editfooter-list { column-width: 27em; }');

//	add CSS for User:BrandonXLF/HotDefaultSort.js -- highlight when there is no DEFAULTSORT
mw.util.addCSS('.hds-no-key { color: darkred; font-weight: bold; }');

// highlight use of obsolete HTML tags
mw.util.addCSS('tt, center, dir, font, menu, xmp, strike { color: DarkRed !important; background: Pink !important; }');

//// quick fixes following bad official changes -- should be able to undo them later (?)

// following Thursday 6 June 2024 to stop the diff spots from U+26AB (see [[Phab:T366845]])
// mw.hook( 'wikipage.diff' ).add( function() { $('.mw-diff-movedpara-left, .mw-diff-movedpara-right').text(''); } );

// quick fix following Thursday 20 June 2024 mess to diff display (see [[Phab:T361717]])
// mw.util.addCSS('.diff-deletedline { border-color: #ffe49c; }');
// mw.util.addCSS('.diff-addedline { border-color: #a3d3ff; }');
// mw.util.addCSS('.diff-deletedline .diffchange, .mw-diff-inline-deleted del, .mw-diff-inline-changed del, .mw-diff-inline-moved del { background: #ffe49c; }');
// mw.util.addCSS('.diff-addedline .diffchange, .mw-diff-inline-added ins, .mw-diff-inline-changed ins, .mw-diff-inline-moved ins { background: #a3d3ff; }');

mw.util.addCSS('.cat-shortdesc-intentionally-none { color: mediumseagreen; font-style: italic; }'); 	//	User:SD0001/shortdescs-in-category.js

//	tone down the talking heads   shttps://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&diff=next&oldid=1325234592
mw.util.addCSS('.ext-checkuser-userinfocard-button.cdx-button .ext-checkuser-userinfocard-button__icon.cdx-button__icon { background-color: cornflowerblue; }');

//	lock left menu to the screen top 
mw.loader.load( '/w/index.php?title=User:BrandonXLF/FloatSide.css&action=raw&ctype=text/css', 'text/css' );