MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

// Including external JavaScript pages // Name consists of both name space and name of the article // In MediaWiki version 1.13 there is a native importScript function // see: wikibits.js

function includePage( name ) { document.write('<\/script>'); }

// Fills Description dialog in Special:Upload // See also MediaWiki:Upload.js

if (wgPageName == 'Special:Upload') importScript( 'MediaWiki:Upload.js' );

// Imports Edittools functions // See also MediaWiki:Edittools.js

if (document.URL.indexOf("action=edit") > 0 || document.URL.indexOf("action=submit") > 0 || document.URL.indexOf("Special:Upload") > 0) importScript( 'MediaWiki:Edittools.js' );

// Moving of article states in the upper right corner importScript( 'MediaWiki:MoveArticleStates.js' );