Usuario:Lmorillas/reader.js

// Basado en http://wikieducator.org/User:JimTittsler/reader.js

// read-mostly layout adjustments for vector skin to make left panel into slideout drawer $(function {  var ppos = -164;  var pmenuheight = $(window).height-15;  var weReaderMode = false;  function restyleSearch { // FIXME custom search may not be loaded yet    $('#p-search').css('margin-bottom', '30px').css('margin-top', '30px');    $('#searchInput, #gcse').css('width', '115px');  }  function reader{    if (!weReaderMode && (window.weReader || ($(window).width <= 1024))) {      weReaderMode = true;      $('#panel').css('position', 'fixed')                 .css('top', '2px')                 .css('left', ppos + 'px')                 .css('background', '#f3f3f3')                 .css('border-right', 'solid black')                 .css('border-bottom', 'solid black')                 .css('z-index', '10')                 .wrapInner('')                 .prepend('WikiEducator '); $('#p-logo').hide; $('#content').css('margin-left', '0px'); $('#p-search').insertBefore('#p-Navigation'); restyleSearch; setTimeout(restyleSearch, 2000); // FIXME $('#p-personal').insertAfter('#p-Navigation') .addClass('portal') .css('position', 'static') .css('right', '0px') .find('ul').wrap(' ').end .find('h5').css('display', 'block').end .find('li').css('float', 'none'); $('#left-navigation').css('top', '0px'); $('#right-navigation').css('margin-top', '0px'); $('#head-base').css('height', '40px'); $('#socialbookmarks').css('padding-left', '0.5em'); $('#panelbutton').click(function(e) {       e.preventDefault;        ppos = (ppos === 0) ? -164 : 0;        $('#panel').animate( {left: ppos }, 'fast');      }); } }  $(window).resize(function {    reader;    if (weReaderMode) {      $('#panelmenu').css('height', $(window).height-15 + 'px');    }  }); reader; });