inherit
Handsome Devil
20992
0
Oct 26, 2012 20:34:21 GMT -8
ⓦ৹₪deⓡ
No animals were harmed in the feeding of this human.
925
March 2004
chickenturkeybacon
|
Post by ⓦ৹₪deⓡ on Jan 3, 2006 2:15:44 GMT -8
This code will alphabetize the users online in the info center. This may not be compatible with other info center modifiers. No editing required. Do NOT PM me for support or requests, that's what the coding boards are for. Enjoy. ~Wonder
Main Footer<script> //Alphabetize Users Online v1.0 [CB]
//Copyright 01-03-2006 by ~Wonder //May be reposted anywhere as long as this header remains in tact
if(!location.href.match(/\=/)) { usersOnline=new Array(); for(i=document.links.length-1;i>=0;i--) { if(document.links[i].parentNode.innerHTML.match(/Most users online/)) { usersOnline.push(document.links[i].cloneNode(true)); if(document.links[i].nextSibling) document.links[i].nextSibling.nodeValue=""; document.links[i].style.display="none"; } else if(usersOnline.length>0) break; }
usersOnline.sort(sortLinks); document.links[i+1].parentNode.insertBefore(usersOnline[usersOnline.length-1],document.links[i+1]); for(j=usersOnline.length-2;j>=0;j--) { c=document.createElement("span"); c.innerHTML=", "; document.links[i+1].parentNode.insertBefore(c,document.links[i+1]); document.links[i+1].parentNode.insertBefore(usersOnline[j],c); } }
function sortLinks(a,b) { c=a.innerHTML.charAt(0).toLowerCase(); d=b.innerHTML.charAt(0).toLowerCase(); if(c>d) return 1; if(c<d) return -1; return 0; } </script>
|
|