MediaWiki:Monobook.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by TheDJ (talk | contribs) at 21:20, 1 December 2009 (remove the extra right offset of the coordinates). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* <source lang=javascript> */
/* Any JavaScript here will be loaded for users using the MonoBook skin */

/** Topbar content fix with sitenotice / 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]]
  */

if((navigator.userAgent.indexOf("MSIE 6")==-1) && (wgAction == 'submit' || wgAction == 'view')) addOnloadHook(function() {
    var cnote = document.getElementById('centralNotice');
    if( !document.getElementById('mw-dismissible-notice') && !(cnote)) return; // fundraiser:  && hasClass(cnote, 'expanded'))) return;
    appendCSS('#bodyContent { position:relative; } \n.topicon { position:absolute; top:-2em !important;}\n#coordinates{ position:absolute; top:1px !important; right:0px !important;}');
})
/* </source> */