MediaWiki:Monobook.js

Note: After saving, 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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* Any JavaScript here will be loaded for users using the MonoBook skin */

/**
 * Topbar content fix with sitenotice and CentralNotice
 *
 * Description: This fixes the location of topbar content (e.g., featured
 *              content star) when the sitenotice or CentralNotice is active.
 * Maintainers: [[User:TheDJ]], [[User:MZMcBride]]
 */
// Not in IE6, only when editing/previewing a page
if ( (navigator.userAgent.indexOf('MSIE 6') == -1) && (wgAction == 'submit' || wgAction == 'view') ) {
jQuery( function( $ ) {

	var $cNote = $( '#centralNotice' );
	// If there is no dismissible sitenotice and no expanded centralnotice:
	if( !$( '#mw-dismissible-notice' ).length && !($cNote.length && $cNote.hasClass('expanded')) ) {
		return;
	}
	// Otherwise:
	mw.util.addCSS( '#bodyContent{ position:relative } .topicon{ position:absolute; top:-2em !important } #coordinates{ position:absolute; top:1px !important }' );

});
}