Jump to content

User:GhostInTheMachine/WatchlistTidy.js

From Wikipedia, the free encyclopedia
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.
if(mw.config.get('wgPageName') === 'Special:Watchlist') {
  mw.loader.using( 'mediawiki.rcfilters.filters.ui', function () {
    x$ = $('.mw-rcfilters-ui-filterWrapperWidget-showNewChanges').detach();
    $('.mw-rcfilters-ui-markSeenButtonWidget').parent().after(x$);

    mw.util.addCSS(`
      .mw-rcfilters-head {
        min-height: 0em !important;
        margin-bottom: 0em !important;
      }
      .mw-rcfilters-ui-watchlistTopSectionWidget-savedLinksTable {
        background-color: aliceblue;
      }
    `);
    
    $( ".mw-rcfilters-ui-filterTagMultiselectWidget" )
      .css( 'text-align', 'left' )
      .wrap( $("<div>" ).css('text-align', 'right') );

  });
}