vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Sub-boards in [ ]

Sub-boards in [ ] - Posted By Michael (wrighty) on 15th May 08 at 8:52pm
This code will place your sub-board names in square brackets... [ and ]

<script>
/*Sub-Boards in []
Created By Wrighty*/

var x = get('font','tag');

for(c=0; c<x.length; c++){
    if(x[c].innerHTML.match(/Sub-Boards/) && x[c].size == '1'){
        x[c].innerHTML = x[c].innerHTML.replace(/,/,' -');
        var f = x[c].getElementsByTagName('a');
        var l = document.createElement('font');
        l.appendChild(document.createTextNode('['));
        l.color = '#FFFFFF';
        var r = document.createElement('font');
        r.appendChild(document.createTextNode(']'));
        r.color = '#FFFFFF';
        for(y=0;y<f.length;y++){
            f[y].parentNode.insertBefore(l.cloneNode(true), f[y]);
            f[y].parentNode.insertBefore(r.cloneNode(true), f[y].nextSibling);
        }
    }
}
</script>


Global Footer