It also automatically restart after a few seconds... ;)

Printable View
It also automatically restart after a few seconds... ;)
I was bored, so I thought I would make a start on a CTF challenge website, this is what I've done so far.
http://i.imgur.com/hlgnTB9.jpg
Start of my fourth version of my forum software. Need to find a good background image.
http://i.imgur.com/SzcuNck.png
Started to tweak the design:
http://i.imgur.com/g7a2NKh.png
Since you are so fucking curious about why we dogs have wet noses, i can ellaborate it pretty simple :
If you spend half the day smelling your colon, eventually you will get so much shit in your nose that your nose starts sweating!
I had 5 minutes to spare:
https://www.youtube.com/watch?v=f5L18KK9Kbc
Start of the topic index page.
The rating system hides it's self if the screen resolution is less than x pixels, and reappears when it's over the limit.
https://docc9g.by3302.livefilestore....804.png?psid=1
Made a dynamic dates script for my forum, it converts a Unix Epoch time stamp to a string like this "21 minutes 49 seconds".
https://www.youtube.com/watch?v=xHifgXRxRwo
I tested it with 1000 instances on a page at 100x speed and it ran ok.
source code(unfinished, first test version):
Code:
convertDate = function(now,date,elem,end)
{
this.elem = document.getElementById(elem);
this.now = now;
this.time = date;
this.diff = this.now - this.time;
this.string = '';
this.end = end;
this.createString();
this.displayDate();
this.loop = null;
this.updateDate();
}
convertDate.prototype.pluralize = function (unit,text)
{
if(unit > 1 || unit == 0){
return unit + " " + text+"s"+this.end;
} else {
return unit + " " + text+this.end;
}
}
convertDate.prototype.createSubString = function (rem,text)
{
if(rem >= 1){
return this.pluralize(rem,text);
} else {
return '';
}
}
convertDate.prototype.createString = function () {
var d = this.diff;
var minute = 60;
var hour = minute * 60;
var day = hour * 24;
var week = day * 7;
var year = week * 52;
var seconds = d;
var minutes = d / minute;
var hours = d / hour;
var days = d / day;
var weeks = d / week;
var years = d / year;
this.string = '';
/*
* Remainder
*/
var rem = 0;
/*
* Create temp variable for the full value, before we floor it
*/
var temp = 0;
/*
* Create sub string if user wants extended string
*/
var subString = '';
if(minutes < 1){
this.string = this.pluralize(d, 'second');
} else if (minutes >= 1 && minutes < 60) {
temp = minutes;
minutes = Math.floor(minutes);
rem = Math.round((temp - minutes) * minute);
substring = this.createSubString(rem,'second');
this.string = this.pluralize(minutes, 'minute')+substring;
}else if(hours >= 1 && hours < 24){
temp = hours;
hours = Math.floor(hours);
rem = Math.floor((temp - hours) * minute);
substring = this.createSubString(rem, 'minute');
this.string = this.pluralize(hours,'hour')+substring;
}else if(days >= 1 && days < 7){
temp = days;
days = Math.floor(days);
rem = Math.floor((temp - days) * 24);
substring = this.createSubString(rem, 'hour');
this.string = this.pluralize(days,'day')+substring;
}else if(weeks >= 1 && weeks < 52){
temp = weeks;
weeks = Math.floor(weeks);
rem = Math.floor((temp - weeks) * 7);
substring = this.createSubString(rem, 'day');
this.string = this.pluralize(weeks,'week')+substring;
}else if(years >= 1){
temp = years;
years = Math.floor(years);
rem = Math.floor((temp - years) * 52);
substring = this.createSubString(rem, 'week');
this.string = this.pluralize(years,'year')+substring;
}
//-------------------------------------------//
/*
this.string = this.string + "<br><br>";
var t = [seconds, minutes, hours, days, weeks, years];
for(var i = 0; i < t.length; i++){
this.string = "<br>"+this.string + " " + t[i]+"<br>";
}
*/
}
convertDate.prototype.displayDate = function ()
{
this.elem.innerHTML = this.string;
}
convertDate.prototype.updateDate = function ()
{
var self = this;
var tick = function () {
self.diff++;
self.createString();
self.displayDate();
}
this.loop = setInterval(tick,1000);
}
I made snow for a webpages using a html5 canvas as the background.
At first I made the snow travel in the direction of the mouse cursor, but I think it looks better when the all go on their own paths.(unfinished)
https://www.youtube.com/watch?v=pmzxHcVUxNs