Alphabetize the Skin List Code:
Main Footer:
<script type="text/javascript"><!--
// Alphabetize the Skin List
// (C) Charles Stover (a.k.a. GAMEchief, SegaDragon)
// http://gamingmedley.com
if (location.href.match(/action=modifyprofile/))
{
var selects = document.getElementsByTagName("select"), s;
for (s = 0; s < selects.length; s++)
{
if (selects[s].getAttribute("name") == "skin")
{
var currentSkin = selects[s].selectedIndex,
skinIDs = new Array(), skinNames = new Array(), o;
for (o = 0; o < selects[s].options.length; o++)
{
var name = selects[s].options[o].innerHTML;
skinNames.push(name);
skinIDs[name] = selects[s].options[o].getAttribute("value");
}
skinNames.sort();
for (o = 0; o < skinNames.length; o++)
{
selects[s].options[o].innerHTML = skinNames[o];
selects[s].options[o].setAttribute("value", skinIDs[skinNames[o]]);
if (currentSkin == Number(skinIDs[skinNames[o]]) - 1)
selects[s].selectedIndex = o;
}
}
}
}
//--></script>
// Alphabetize the Skin List
// (C) Charles Stover (a.k.a. GAMEchief, SegaDragon)
// http://gamingmedley.com
if (location.href.match(/action=modifyprofile/))
{
var selects = document.getElementsByTagName("select"), s;
for (s = 0; s < selects.length; s++)
{
if (selects[s].getAttribute("name") == "skin")
{
var currentSkin = selects[s].selectedIndex,
skinIDs = new Array(), skinNames = new Array(), o;
for (o = 0; o < selects[s].options.length; o++)
{
var name = selects[s].options[o].innerHTML;
skinNames.push(name);
skinIDs[name] = selects[s].options[o].getAttribute("value");
}
skinNames.sort();
for (o = 0; o < skinNames.length; o++)
{
selects[s].options[o].innerHTML = skinNames[o];
selects[s].options[o].setAttribute("value", skinIDs[skinNames[o]]);
if (currentSkin == Number(skinIDs[skinNames[o]]) - 1)
selects[s].selectedIndex = o;
}
}
}
}
//--></script>
Code Database:
If you have a Code Database (a forum that serves as a collection of scripts) on your message board, you may paste the following code into that forum to add it your own code list.
[b]Title:[/b] [url=http://proboards.gamingmedley.com/codes/alphabetize-the-skin-list.html]Alphabetize the Skin List[/url]
[b]Creator:[/b] Charles Stover (a.k.a. GAMEchief, SegaDragon)
[b]Cross-Browser:[/b] Yes
[b]Placement:[/b] Main Footer
[code]<script type="text/javascript"><!--
// Alphabetize the Skin List
// (C) Charles Stover (a.k.a. GAMEchief, SegaDragon)
// http://gamingmedley.com
if (location.href.match(/action=modifyprofile/))
{
var selects = document.getElementsByTagName("select"), s;
for (s = 0; s < selects.length; s++)
{
if (selects[s].getAttribute("name") == "skin")
{
var currentSkin = selects[s].selectedIndex,
skinIDs = new Array(), skinNames = new Array(), o;
for (o = 0; o < selects[s].options.length; o++)
{
var name = selects[s].options[o].innerHTML;
skinNames.push(name);
skinIDs[name] = selects[s].options[o].getAttribute("value");
}
skinNames.sort();
for (o = 0; o < skinNames.length; o++)
{
selects[s].options[o].innerHTML = skinNames[o];
selects[s].options[o].setAttribute("value", skinIDs[skinNames[o]]);
if (currentSkin == Number(skinIDs[skinNames[o]]) - 1)
selects[s].selectedIndex = o;
}
}
}
}
//--></script>[/code]
[b]Creator:[/b] Charles Stover (a.k.a. GAMEchief, SegaDragon)
[b]Cross-Browser:[/b] Yes
[b]Placement:[/b] Main Footer
[code]<script type="text/javascript"><!--
// Alphabetize the Skin List
// (C) Charles Stover (a.k.a. GAMEchief, SegaDragon)
// http://gamingmedley.com
if (location.href.match(/action=modifyprofile/))
{
var selects = document.getElementsByTagName("select"), s;
for (s = 0; s < selects.length; s++)
{
if (selects[s].getAttribute("name") == "skin")
{
var currentSkin = selects[s].selectedIndex,
skinIDs = new Array(), skinNames = new Array(), o;
for (o = 0; o < selects[s].options.length; o++)
{
var name = selects[s].options[o].innerHTML;
skinNames.push(name);
skinIDs[name] = selects[s].options[o].getAttribute("value");
}
skinNames.sort();
for (o = 0; o < skinNames.length; o++)
{
selects[s].options[o].innerHTML = skinNames[o];
selects[s].options[o].setAttribute("value", skinIDs[skinNames[o]]);
if (currentSkin == Number(skinIDs[skinNames[o]]) - 1)
selects[s].selectedIndex = o;
}
}
}
}
//--></script>[/code]