Jump to content

User:Gerbrant/hidePane.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gerbrant (talk | contribs) at 14:04, 17 November 2006 (first try of a pane hider). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
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.
document.write("<style>.portlet ul{margin-left:0}#p-cactions{left:2.5em}#content{margin-left:2em!important}</style>");

new function()
{

var l = [];

function doPortlet(e)
{
e.lastChild.style.width = "11.5em";
e.onmouseover = function(){
e.style.width="";
window.event.cancelBubble=true;
};
l.push(e);
}

function hidePortlets(){
var e;
for(e in l)l[e].style.width="2em";
}

document.body.onmouseover = hidePortlets;

doPortlet(document.getElementById("p-navigation"));

hidePortlets();
}