User:Art Klang/vector.js

var new_li=document.createElement('li'); new_li.setAttribute('id','ca_sidebar'); document.getElementById('p-namespaces').getElementsByTagName('ul')[0].appendChild(new_li); var b_sidebar=document.getElementById('ca_sidebar'); b_sidebar.innerHTML=" Show sidebar "; sidebar_shown=0; function toggle_sidebar { var sidebar=document.getElementById('mw-panel'); if (sidebar_shown==0) { sidebar_shown=1; sidebar.setAttribute("style","visibility:visible;background-color:#111111;box-shadow: 0px 0px 5px #70C5FD;margin-left:10px;"); b_sidebar.innerHTML=" Hide sidebar "; document.getElementById('p-logo').setAttribute('style','visibility:hidden;'); document.getElementById('content').setAttribute('onclick','toggle_sidebar;'); } else { sidebar.setAttribute("style","visibility:hidden;"); sidebar_shown=0; b_sidebar.innerHTML=" Show sidebar "; document.getElementById('content').removeAttribute('onclick'); } }