User:I6

From Valve Developer Community
Revision as of 07:38, 5 January 2016 by I6 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<!DOCTYPE html> <head> <STYLE TYPE="text/css"> </style> </head> <body>

*
*
*
*

Countdown until the Year 3000
<a href="http://www.codecademy.com/i6">Made by i6</a>

<SCRIPT LANGUAGE="javascript" TYPE="text/javascript">


//Updated December 15th, 2015 8:54:45 AM

var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes

var nav = (!document.all || window.opera); var tmr = null; var spd = 50; var x = 0; var x_offset = 5; var y = 0; var y_offset = 15;

document.onmousemove = get_mouse;

function get_mouse(e) {

 x = (nav) ? e.pageX : event.clientX+standardbody.scrollLeft;
 y = (nav) ? e.pageY : event.clientY+standardbody.scrollTop;
 x += x_offset;
 y += y_offset;
 beam(1);     

}

function beam(n) {

 if(n<5)
 {

document.getElementById('div'+n).style.top=y+'px' document.getElementById('div'+n).style.left=x+'px' document.getElementById('div'+n).style.visibility='visible'

   n++;
   tmr=setTimeout("beam("+n+")",spd);
 }
 else
 {
    clearTimeout(tmr);
    fade(4);
 }   

}

function fade(n) {

 if(n>0) 
 {

document.getElementById('div'+n).style.visibility='hidden'

   n--;
   tmr=setTimeout("fade("+n+")",spd);
 }
 else clearTimeout(tmr);

}

// --> </SCRIPT> </body> <body> <form name="count" method="post"> <input type="text" size="69" name="count2"> </form>


<script>

/* this website is here to countdown when the date becomes 3000/1/1

  • /


//change the text below to reflect your own, var before="the Year 3000!" var current="Today is Year 3000!" var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function countdown(yr,m,d){ theyear=yr;themonth=m;theday=d var today=new Date() var todayy=today.getYear() if (todayy < 1000) todayy+=1900 var todaym=today.getMonth() var todayd=today.getDate() var todayh=today.getHours() var todaymin=today.getMinutes() var todaysec=today.getSeconds() var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec futurestring=montharray[m-1]+" "+d+", "+yr dd=Date.parse(futurestring)-Date.parse(todaystring) dday=Math.floor(dd/(60*60*1000*24)*1) dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1) dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1) dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1) if(dday==0&&dhour==0&&dmin==0&&dsec==1){ document.forms.count.count2.value=current return } else document.forms.count.count2.value=dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+before setTimeout("countdown(theyear,themonth,theday)",1000) } //enter the count down date using the format year/month/day countdown(3000,1,1) </script> </body> <style type="text/css">

body {background-color:FF3333;background-image:url(http://www.quackit.com/pix/smile.gif);background-repeat:repeat;background-position:center center;background-attachment:fixed;} table, tr, td {background:transparent; border:0px;}table table {border:0px;}table table table table {border:0px;}table table table {background-color:33FF99;border-width:0;border-style:solid;border-color:ffcc00;} td, span, div, input, a, table td div div font, body div table tbody tr td font {font-family:Arial;font-size:8pt;color:000000;} a {color:000099;}


</style>