JSFiddle

  • Async call data

    Sync async ajax call data into one list.

    	//calls the provided url and returns the handler
    	function fetchBlogPosts(feed) {
    	    return $.ajax({
    	        type: "GET",
    	        url: document.location.protocol + '//ajax ...
  • Array apply function

    Execute a function using the apply prototype function and passing an array.

    function logMessage() {
        for (var i = 0; i < arguments.length; i++) {
            console.log(arguments[i]);
        }
    }
    
    logMessage("tim is cool");
    
    var messages ...
  • De obfuscation of the 600 bytes matrix #23 is the latest revision

    De obfuscation of http://timelessname.com/sandbox/matrix.html

    //original source :  http://timelessname.com/sandbox/matrix.html
    //set the canvas to take the entire screen
    canvas.height = window.screen ...
  • Javascript Factory pattern

    No-Library (pure JS), HTML, CSS, JavaScript

     function VehicleFactory() {}
     VehicleFactory.prototype.vehicleClass = Car;
     VehicleFactory.prototype.getVehicle = function (options) {
         return new this.vehicleClass(options);
     };
    
     var carFactory = new VehicleFactory ...
  • Javascript Static Singleton #11 is the latest revision

    Singleton pattern for Javascript

    var SingletonTester = (function () {
        //This is the actual singleton instance
        function Singleton() {
            this.name = "Singleton";
            this.pointX = 16;
        }
    
        // this is our ...