MediaWiki:Monobook.js

/* Any JavaScript here will be loaded for users using the MonoBook skin */ /* For the floating sidebar thingy (see MediaWiki:Monobook.css); change the top value for NewsBox (#p-ShoutWiki_messages) when the toolbox is very small (i.e. it has only WhatLinksHere/Upload/SpecialPages links) */ jQuery( document ).ready( function {	var height = jQuery( '#p-tb' ).height;	if ( height < 100 ) {		// if the toolbox has *four* items (WhatLinksHere, *related changes*, // upload and SpecialPages, NewsBox needs a different top value // than when the toolbox has *three* items (no related changes) if ( jQuery( 'li#t-recentchangeslinked' ).length > 0 ) { jQuery( '#p-ShoutWiki_messages' ).css( 'top', '515px' ); } else { jQuery( '#p-ShoutWiki_messages' ).css( 'top', '500px' ); }	} } );