Jump to content

User:SMcCandlish/global.js

From Meta, a Wikimedia project coordination wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// Find template with duplicate parameters
// https://en.wikipedia.org/wiki/User:Frietjes/findargdups
findargdupsresultsbox = 'yes';
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Frietjes/findargdups.js&action=raw&ctype=text/javascript');

// Highlight admin names – style tweaked in common.css
//  It's sad that we'd need to do this, but too many admins violate WP:INVOLVED (w:en:WP:INVOLVED).
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Theopolisme/Scripts/adminhighlighter.js&action=raw&ctype=text/javascript');

// Show some basic user info underneath usernames at the top of user and user talk pages:
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:SMcCandlish/userinfo.js&action=raw&ctype=text/javascript');
// Essentially the same thing, but uses icons to the side of the username; not sure yet which I prefer:
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Anomie/useridentifier.js&action=raw&ctype=text/javascript'); // Linkback: [[w:en:User:Anomie/useridentifier.js]]

// Get slightly more informative details about WikiData in watchlist entries:
// - Doc: https://en.wikipedia.org/User:Evad37/WikidataWatchlistLabels
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Evad37/WikidataWatchlistLabels.js&action=raw&ctype=text/javascript');

// Turn on the "Other Projects Sidebar" features in all wikis
// - Intentionally using non-strict comparison with ==, not ===, because of [[phab:T54542]]
if ( mw.user.options.get( 'wikibase-otherprojects' ) == 0 ) {
    mw.loader.using( 'mediawiki.api', function () {
        ( new mw.Api() ).postWithToken( 'options', {
            action: 'options',
            optionname: 'wikibase-otherprojects',
            optionvalue: 1
        } );
    } );
}

// Do some markup to edits by blocked users
// - This may fail on non-English wikis.
var markblocked_contributions = 'Special:Contributions';
mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&bcache=1&maxage=259200&action=raw&ctype=text/javascript');

//Automatically tick the "Move subpages" option when moving pages.
var moveSubpagesBox = document.getElementsByName("wpMovesubpages")[0];
if (moveSubpagesBox !== undefined) {
  moveSubpagesBox.checked = true;
}

// Add link to watchlist a template's /doc files:
mw.loader.load( "https://en.wikipedia.org/w/index.php?title=User:Frietjes/watchdoc.js&action=raw&bcache=1&maxage=86400&ctype=text/javascript" );

// Blame this on Ed - borrowed from w:en:User:WhatamIdoing/global.js //
mw.loader.load( 'https://meta.wikimedia.org/w/index.php?title=User:ESanders_(WMF)/commentlinks.js&action=raw&ctype=text/javascript' );