MediaWiki:Common.js

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

/** * MainPage-tab * On the main page (and its associated namespaces and actions (Talk, edit, history etc.) * this script will put "Main Page" instead of "Article" or "Page" in the first tab. * * @source: http://www.mediawiki.org/wiki/Snippets/Main_Page_tab * @rev: 2 */ $( document ).ready( function { var title = mw.config.get( 'wgTitle' ); var hasMainPageTab = (title == 'Main Page'); // Title of the main page. If applicable, without the namespace prefix (eg. "MyWiki:") if ( hasMainPageTab ){ $( '#ca-nstab-main a' ).text( title ); } } );

/* Collapsible Tables */

if ( wgIsArticle || window.location.href.indexOf( 'action=submit' ) > -1 ) { var script  = document.createElement( 'script' ); script.src = '/index.php?title=MediaWiki:Common.js/CollapsibleTables.js&action=raw&ctype=text/javascript'; script.type = 'text/javascript'; document.getElementsByTagName( 'head' )[0].appendChild( script );

hookEvent( 'load', function { new CollapsibleTables; } ); }