Registration has been disabled and the moderation extension has been turned off.

Contact an admin on Discord or EDF if you want an account. Also fuck bots.

User:Evilea/Test.js: Difference between revisions

From Encyclopedia Dramatica
Jump to navigation Jump to search
imported>Evilea
Created page with "<script type="text/javascript"> function GetClock(){ d = new Date(); nhour = d.getHours(); nmin = d.getMinutes(); if(nhour == 0) {ap = " AM";nhour = 12;} else if(nhour..."
imported>Evilea
Created page with "<script type="text/javascript"> function GetClock(){ d = new Date(); nhour = d.getHours(); nmin = d.getMinutes(); if(nhour == 0) {ap = " AM";nhour = 12;} else if(nhour..."
 
(No difference)

Latest revision as of 20:47, 4 January 2013

<script type="text/javascript">

function GetClock(){
d = new Date();
nhour  = d.getHours();
nmin   = d.getMinutes();
     if(nhour ==  0) {ap = " AM";nhour = 12;} 
else if(nhour <= 11) {ap = " AM";} 
else if(nhour == 12) {ap = " PM";} 
else if(nhour >= 13) {ap = " PM";nhour -= 12;}

if(nmin <= 5) {nmin = "0" +nmin;}


document.getElementById('clockbox').innerHTML=""+nhour+":"+nmin+ap+"";
setTimeout("GetClock()", 1000);
}
window.onload=GetClock;
</script>
<div id="clockbox"></div>