MediaWiki:Common.js: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: var markblocked_contributions = 'Special:Contributions'; mw.loader.load('//en.wikipedia.org/w/index....")
 
No edit summary
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
var markblocked_contributions = 'Special:Contributions';
mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&bcache=1&maxage=259200&action=raw&ctype=text/javascript');
$( function () {
$( function () {
if ( $( '#ca-purge' ).length || !mw.config.get( 'wgIsArticle' ) ) return;
if ( $( '#ca-purge' ).length || !mw.config.get( 'wgIsArticle' ) ) return;

Revision as of 01:13, 12 July 2024

/* Any JavaScript here will be loaded for all users on every page load. */
$( function () {
	if ( $( '#ca-purge' ).length || !mw.config.get( 'wgIsArticle' ) ) return;
	mw.util.addPortletLink(
		'p-cactions',
		mw.util.getUrl( null, { action: 'purge' } ),
		"Purge",
		'ca-purge',
		'Purge the server cache of this page',
		'*'
	);
});