inherit
nooberus stupidus
6274
0
May 6, 2012 14:05:21 GMT -8
Suicide Guy
17,314
November 2002
suicideguy
|
Post by Suicide Guy on Jun 26, 2005 11:59:49 GMT -8
This code works in IE, FF and Opera.
This code is used to change the color of members' names on a per username basis. To add more members, simply copy the colorName("Username", "Color"); line, paste it below the existing colorName("Username", "Color"); line, and substitute the necessary items. This code goes into your Global Footer. <script type="text/javascript"> <!-- /* color member names */ function colorName(name,color) { var a = document.getElementsByTagName('a'); for (i=0; i<a.length; i++) { if (a.item(i).href.match(new RegExp('action=viewprofile&user='+name + '$', 'i'))) { if(a.item(i).hasChildNodes() && a.item(i).firstChild.nodeType == 1) a.item(i).firstChild.style.color=color; a.item(i).style.color=color; } } }
colorName("Username", "Color");
// --> </script> Edits Ross on 18th July 07: Edited to override any group color set via the "Create/Modify Group" page Ross on 19th Jan 07: Fixing incompatibility with AOL browser.
|
|