Post by Wormopolis on Aug 22, 2009 21:43:47 GMT -8
Browser Tested: IE and FF
placement: main footer
replaces your on/off icons with Andy Warhol style color grids. The grids are customizable and will have random colors (see 2 examples above this post) on icons will be colored, off icons will be greyscale.
code:
preview: www.wormocodes.com/index.cgi?board=codesubs&action=display&thread=247
placement: main footer
replaces your on/off icons with Andy Warhol style color grids. The grids are customizable and will have random colors (see 2 examples above this post) on icons will be colored, off icons will be greyscale.
code:
<script type="text/javascript">
<!--
// popArt on/off icons. Andy Warhol style
// by Wormopolis - www.wormocodes.com
// keep header intact - do Not Repost
function numTOhex (d) {return (d.toString(16).length>1? d.toString(16): "0"+d.toString(16));}
if (true) {
// THESE VARIABLES MODIFY THE GRID
iconHeight=30;
iconWidth=30;
iconCols=5;
iconRows=5;
// ----------------------------------------------
function popArt(st) {
nwIcon=document.createElement('table');
nwIcon.style.backgroundColor="000000"; nwIcon.style.width=iconWidth; nwIcon.style.height=iconHeight;
for (r=0; r<iconRows; r++) {
nwIcon.insertRow(-1);
for (c=0; c<iconCols; c++) {
nwIcon.rows[r].insertCell(-1);
retColor=""+numTOhex(Math.floor(Math.random()*256))+ numTOhex(Math.floor(Math.random()*256))+ numTOhex(Math.floor(Math.random()*256));
retGreyColor=numTOhex(Math.floor(Math.random()*256));
bgclr=(st=="[/li][li]" ? retColor : retGreyColor+retGreyColor+retGreyColor);
nwIcon.rows[r].cells[c].style.backgroundColor=bgclr;
nwIcon.rows[r].cells[c].style.width=(iconWidth/iconCols); nwIcon.rows[r].cells[c].style.width=(iconHeight/iconRows);
}
}
return nwIcon;
}
for (tds=document.getElementsByTagName('td'), w=0; w<tds.length; w++) {
if (tds[w].width=='8%' && tds[w].className=='windowbg') {
sts=tds[w].firstChild.alt;
art= popArt(sts);
tds[w].replaceChild(art,tds[w].firstChild);
}
}
}
// -->
</script>
preview: www.wormocodes.com/index.cgi?board=codesubs&action=display&thread=247