User:Krömer/vector.js

$(document).ready(function { var panelStyle = document.getElementById('mw-panel').style;  function resize {    panelStyle.height = (window.innerHeight - parseInt(panelStyle.top)) + 'px';  }  resize;  window.addEventListener('resize', resize);  function scroll {    if(window.scrollY <= 160) {      panelStyle.top = (160 - window.scrollY) + 'px';    } else {      panelStyle.top = '0px';    }    resize;  }  scroll;  window.addEventListener('scroll', scroll);  document.getElementById('mw-head').appendChild(document.getElementById('p-logo'));  document.getElementById('searchInput').focus; });