|
Post by Wormopolis on Dec 19, 2008 15:47:26 GMT -8
Browsers Tested: IE and FF placement: Global Header (as long as its below welcome table)
lets you choose individual buttons to hide.
<script type="text/javascript"> <!-- // hide buttons in menu by Wormopolis - do not repost // version 2.101
// edit these true or false var removeit=new Array(); removeit['Home']=false; removeit['Help']=true; removeit['Search']=true; removeit['Members']=false; removeit['Calendar']=true; removeit['Profile']=false; removeit['Chat']=true; removeit['New Topics']=true;
var removeBrackets=true; //remove brackets around text menus var buttonSeperate=" | ";
var larry=document.getElementsByTagName('td'); for (curly=0; curly<larry.length; curly++) { for (i=0; i<larry[curly].attributes.length; i++) if (larry[curly].attributes[i].value=='menubg') var safeguard=true; if (larry[curly].innerHTML.match(/home/i) && safeguard) { moe=larry[curly].getElementsByTagName('a'); for (wormo=0; wormo<moe.length; wormo++) { btnname=(moe[wormo].firstChild.nodeName.match(/img/i) ? moe[wormo].firstChild.alt.replace(/\[|\]/g,'') : moe[wormo].firstChild.nodeValue.replace(/\[|\]/g,'') ); if (removeit[btnname] ) { moe[wormo].style.display='none'; if (moe[wormo].previousSibling && moe[wormo].previousSibling.nodeName.match(/text/i)) moe[wormo].previousSibling.nodeValue=''; } else { if (moe[wormo].previousSibling && moe[wormo].previousSibling.previousSibling && moe[wormo].previousSibling.nodeName.match(/text/i)) moe[wormo].previousSibling.nodeValue=buttonSeperate; if (removeBrackets && moe[wormo].firstChild.nodeName.match(/text/i)) moe[wormo].firstChild.nodeValue=btnname; } } } }
// --> </script>
Preview: self explanatory
|
|
|
Post by Wormopolis on Oct 2, 2010 1:12:33 GMT -8
version update 2.0: changed variable to array and removed spaces after a deleted button.
|
|
|
Post by Wormopolis on Jun 21, 2012 18:46:40 GMT -8
version update 2.1: added in a seperator option, as well as ability to remove brackets from text menus
|
|