Written for IPB1.3 / invisionfree
this is a function from my coding tournament entry, its pretty cool apart from it aswell. its a time system wich if your gmt settings are correct is really awsome. it makes the dates bold if it is the current date so if some1 really is online right now!
Quote:
<script>
/*Online list upgrade by Godkillah
for more awsome scripts visit http://www.phantom-designs.net*/
function timecheck(){
targy=document.getElementsByTagName("td")
var today=new Date()
var h=today.getHours()
var m=today.getMinutes()
if(location.href.match(/act=Online/i)){
if(h>12){
h=h-12
}
if(m<10){
var addzerom=true
}
if(h<10){
var addzeroh=true
}
if(addzerom==true){
if(addzeroh==true){
var time="0"+h+":0"+m
}else{
var time=h+":0"+m
}}else{
var time=h+":"+m
}
for (pd=0;pd<document.getElementsByTagName("td").lengt h;pd++){
if(document.getElementsByTagName("td")[pd].innerHTML.match(time)){
document.getElementsByTagName("td")[pd].innerHTML="<b>"+document.getElementsByTagName("td ")[pd].innerHTML+"</b>"
}}}}
timecheck()
</script>
|