SJA random projects - Page 8

User Tag List

Page 8 of 24 FirstFirst ... 67891018 ... LastLast
Results 71 to 80 of 236
  1. #71
    Whicked Sick Chamberly's Avatar
    Join Date
    Jul 2012
    Location
    Vandora Temple
    Posts
    5,488
    Country:
    It also automatically restart after a few seconds...


    http://irc.lc/globalgamers/uscript for uscript discussion.

  2. #72
    Whicked Sick UT-Sniper-SJA94's Avatar
    Join Date
    Oct 2011
    Location
    What was England
    Posts
    4,427
    Country:
    I was bored, so I thought I would make a start on a CTF challenge website, this is what I've done so far.

  3. #73
    Whicked Sick UT-Sniper-SJA94's Avatar
    Join Date
    Oct 2011
    Location
    What was England
    Posts
    4,427
    Country:
    Start of my fourth version of my forum software. Need to find a good background image.

  4. #74
    Whicked Sick UT-Sniper-SJA94's Avatar
    Join Date
    Oct 2011
    Location
    What was England
    Posts
    4,427
    Country:
    Started to tweak the design:

  5. #75
    Whicked Sick UT-Sniper-SJA94's Avatar
    Join Date
    Oct 2011
    Location
    What was England
    Posts
    4,427
    Country:

  6. #76
    Moderator |uK|Nordog's Avatar
    Join Date
    May 2012
    Posts
    911
    Country:
    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!

  7. #77
    Whicked Sick UT-Sniper-SJA94's Avatar
    Join Date
    Oct 2011
    Location
    What was England
    Posts
    4,427
    Country:
    I had 5 minutes to spare:

  8. #78
    Whicked Sick UT-Sniper-SJA94's Avatar
    Join Date
    Oct 2011
    Location
    What was England
    Posts
    4,427
    Country:
    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.


  9. #79
    Whicked Sick UT-Sniper-SJA94's Avatar
    Join Date
    Oct 2011
    Location
    What was England
    Posts
    4,427
    Country:
    Made a dynamic dates script for my forum, it converts a Unix Epoch time stamp to a string like this "21 minutes 49 seconds".




    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);
        
    }

  10. #80
    Whicked Sick UT-Sniper-SJA94's Avatar
    Join Date
    Oct 2011
    Location
    What was England
    Posts
    4,427
    Country:
    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)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Another random game
    By UT-Sniper-SJA94 in forum Spam Section
    Replies: 79
    Last Post: 06-29-2015, 07:59 PM
  2. Random siege gif.
    By Chamberly in forum Screenshots
    Replies: 8
    Last Post: 01-05-2015, 04:17 AM
  3. Ben10 / Random / random Anime names
    By uenz in forum Reports/Complaints & Appeals
    Replies: 7
    Last Post: 08-30-2014, 02:43 PM
  4. Random bug
    By UT-Sniper-SJA94 in forum Spam Section
    Replies: 7
    Last Post: 03-13-2014, 11:22 AM
  5. Everybody random guy
    By |uK|B|aZe//. in forum Bans
    Replies: 0
    Last Post: 12-23-2011, 10:31 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •