MediaWiki:Monobook.js: Difference between revisions

From EPOD
(Created page with "→‎Any JavaScript here will be loaded for users using the MonoBook skin: window.onscroll = function (e) { var vertical_position = 0; if (pageYOffset)//usual vertical...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Any JavaScript here will be loaded for users using the MonoBook skin */
/* Any JavaScript here will be loaded for users using the MonoBook skin */
window.onscroll = function (e) {
  var vertical_position = 0;
  if (pageYOffset)//usual
    vertical_position = pageYOffset;
  else if (document.documentElement.clientHeight)//ie
    vertical_position = document.documentElement.scrollTop;
  else if (document.body)//ie quirks
    vertical_position = document.body.scrollTop;
  //document.getElementById('mw-head').style.top = (vertical_position) + 'px';
  document.getElementById('p-logo').style.top = (vertical_position + 160) + 'px';
}

Latest revision as of 11:15, 28 February 2017

/* Any JavaScript here will be loaded for users using the MonoBook skin */