Jump to content

User:Manishearth/sidebartoggle.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Manishearth (talk | contribs) at 06:10, 24 February 2010. 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.
var ml=10;
function hideSide(){

if(document.getElementById('p-logo').style!==null){document.getElementById('p-logo').style.display='none'}
if(document.getElementById('p-navigation').style!==null){document.getElementById('p-navigation').style.display='none'}
if(document.getElementById('p-search').style!==null){document.getElementById('p-search').style.display='none'}
if(document.getElementById('p-interaction')!==null){document.getElementById('p-interaction').style.display='none'}
if(document.getElementById('p-tb')!==null){document.getElementById('p-tb').style.display='none'}
if(document.getElementById('p-lang')!==null){if(document.getElementById('p-lang').style!==null){document.getElementById('p-lang').style.display='none'}}
if(document.getElementById('p-coll-print_export')!==null){document.getElementById('p-coll-print_export').style.display='none'}
ml=document.getElementById('content').style.marginLeft
document.getElementById('content').style.marginLeft=0;
}
hideSide();
showSide();
function showSide(){

if(document.getElementById('p-logo').style!==null){document.getElementById('p-logo').style.display=''}
if(document.getElementById('p-navigation').style!==null){document.getElementById('p-navigation').style.display=''}
if(document.getElementById('p-search').style!==null){document.getElementById('p-search').style.display=''}
if(document.getElementById('p-interaction')!==null){document.getElementById('p-interaction').style.display=''}
if(document.getElementById('p-tb')!==null){document.getElementById('p-tb').style.display=''}
if(document.getElementById('p-lang')!==null){if(document.getElementById('p-lang').style!==null){document.getElementById('p-lang').style.display=''}}
if(document.getElementById('p-coll-print_export')!==null){document.getElementById('p-coll-print_export').style.display=''}

document.getElementById('content').style.marginLeft=ml;
}
/*#p-logo, #p-navigation, #p-search, #p-interaction,  #p-tb, #p-lang { display: none; }
#content { margin-left:0; } */