Skip to content

Instantly share code, notes, and snippets.

@DimitarChristoff
Created July 9, 2013 14:04
Show Gist options
  • Save DimitarChristoff/5957603 to your computer and use it in GitHub Desktop.
Save DimitarChristoff/5957603 to your computer and use it in GitHub Desktop.
made with requirebin.com
// hello world
require('mootools');
require('colors');
var foo = new Class({
Implements: [Options, Events],
initialize: function(options){
this.setOptions(options);
this.fireEvent('ready');
},
log: function(what){
console.log('[LOG] '.red, what);
}
});
new foo({
onReady: function(){
this.log('ready');
}
});
require=function(t,n,e){function r(e,o){if(!n[e]){if(!t[e]){var a="function"==typeof require&&require;if(!o&&a)return a(e,!0);if(i)return i(e,!0);throw Error("Cannot find module '"+e+"'")}var u=n[e]={exports:{}};t[e][0].call(u.exports,function(n){var i=t[e][1][n];return r(i?i:n)},u,u.exports)}return n[e].exports}for(var i="function"==typeof require&&require,o=0;e.length>o;o++)r(e[o]);return r}({mootools:[function(t,n){n.exports=t("w3DV8k")},{}],w3DV8k:[function(require,module,exports){(function(){this.MooTools={version:"1.4.5",build:"ab8ea8824dc3b24b6666867a2c4ed58ebb762cf0"};var t=this.typeOf=function(t){if(null==t)return"null";if(null!=t.$family)return t.$family();if(t.nodeName){if(1==t.nodeType)return"element";if(3==t.nodeType)return/\S/.test(t.nodeValue)?"textnode":"whitespace"}else if("number"==typeof t.length){if(t.callee)return"arguments";if("item"in t)return"collection"}return typeof t};this.instanceOf=function(t,n){if(null==t)return!1;for(var e=t.$constructor||t.constructor;e;){if(e===n)return!0;e=e.parent}return t.hasOwnProperty?t instanceof n:!1};var n=this.Function,e=!0;for(var r in{toString:1})e=null;e&&(e=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]),n.prototype.overloadSetter=function(t){var n=this;return function(r,i){if(null==r)return this;if(t||"string"!=typeof r){for(var o in r)n.call(this,o,r[o]);if(e)for(var a=e.length;a--;)o=e[a],r.hasOwnProperty(o)&&n.call(this,o,r[o])}else n.call(this,r,i);return this}},n.prototype.overloadGetter=function(t){var n=this;return function(e){var r,i;if("string"!=typeof e?r=e:arguments.length>1?r=arguments:t&&(r=[e]),r){i={};for(var o=0;r.length>o;o++)i[r[o]]=n.call(this,r[o])}else i=n.call(this,e);return i}},n.prototype.extend=function(t,n){this[t]=n}.overloadSetter(),n.prototype.implement=function(t,n){this.prototype[t]=n}.overloadSetter();var i=Array.prototype.slice;n.from=function(n){return"function"==t(n)?n:function(){return n}},Array.from=function(n){return null==n?[]:o.isEnumerable(n)&&"string"!=typeof n?"array"==t(n)?n:i.call(n):[n]},Number.from=function(t){var n=parseFloat(t);return isFinite(n)?n:null},String.from=function(t){return t+""},n.implement({hide:function(){return this.$hidden=!0,this},protect:function(){return this.$protected=!0,this}});var o=this.Type=function(n,e){if(n){var r=n.toLowerCase(),i=function(n){return t(n)==r};o["is"+n]=i,null!=e&&(e.prototype.$family=function(){return r}.hide())}return null==e?null:(e.extend(this),e.$constructor=o,e.prototype.$constructor=e,e)},a=Object.prototype.toString;o.isEnumerable=function(t){return null!=t&&"number"==typeof t.length&&"[object Function]"!=a.call(t)};var u={},s=function(n){var e=t(n.prototype);return u[e]||(u[e]=[])},c=function(n,e){if(!e||!e.$hidden){for(var r=s(this),o=0;r.length>o;o++){var a=r[o];"type"==t(a)?c.call(a,n,e):a.call(this,n,e)}var u=this.prototype[n];null!=u&&u.$protected||(this.prototype[n]=e),null==this[n]&&"function"==t(e)&&l.call(this,n,function(t){return e.apply(t,i.call(arguments,1))})}},l=function(t,n){if(!n||!n.$hidden){var e=this[t];null!=e&&e.$protected||(this[t]=n)}};o.implement({implement:c.overloadSetter(),extend:l.overloadSetter(),alias:function(t,n){c.call(this,t,this.prototype[n])}.overloadSetter(),mirror:function(t){return s(this).push(t),this}}),new o("Type",o);var f=function(t,n,e){var r=n!=Object,i=n.prototype;r&&(n=new o(t,n));for(var a=0,u=e.length;u>a;a++){var s=e[a],c=n[s],l=i[s];c&&c.protect(),r&&l&&n.implement(s,l.protect())}if(r){var h=i.propertyIsEnumerable(e[0]);n.forEachMethod=function(t){if(!h)for(var n=0,r=e.length;r>n;n++)t.call(i,i[e[n]],e[n]);for(var o in i)t.call(i,i[o],o)}}return f};f("String",String,["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","quote","replace","search","slice","split","substr","substring","trim","toLowerCase","toUpperCase"])("Array",Array,["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice","indexOf","lastIndexOf","filter","forEach","every","map","some","reduce","reduceRight"])("Number",Number,["toExponential","toFixed","toLocaleString","toPrecision"])("Function",n,["apply","call","bind"])("RegExp",RegExp,["exec","test"])("Object",Object,["create","defineProperty","defineProperties","keys","getPrototypeOf","getOwnPropertyDescriptor","getOwnPropertyNames","preventExtensions","isExtensible","seal","isSealed","freeze","isFrozen"])("Date",Date,["now"]),Object.extend=l.overloadSetter(),Date.extend("now",function(){return+new Date}),new o("Boolean",Boolean),Number.prototype.$family=function(){return isFinite(this)?"number":"null"}.hide(),Number.extend("random",function(t,n){return Math.floor(Math.random()*(n-t+1)+t)});var h=Object.prototype.hasOwnProperty;Object.extend("forEach",function(t,n,e){for(var r in t)h.call(t,r)&&n.call(e,t[r],r,t)}),Object.each=Object.forEach,Array.implement({forEach:function(t,n){for(var e=0,r=this.length;r>e;e++)e in this&&t.call(n,this[e],e,this)},each:function(t,n){return Array.forEach(this,t,n),this}});var p=function(n){switch(t(n)){case"array":return n.clone();case"object":return Object.clone(n);default:return n}};Array.implement("clone",function(){for(var t=this.length,n=Array(t);t--;)n[t]=p(this[t]);return n});var m=function(n,e,r){switch(t(r)){case"object":"object"==t(n[e])?Object.merge(n[e],r):n[e]=Object.clone(r);break;case"array":n[e]=r.clone();break;default:n[e]=r}return n};Object.extend({merge:function(n,e,r){if("string"==t(e))return m(n,e,r);for(var i=1,o=arguments.length;o>i;i++){var a=arguments[i];for(var u in a)m(n,u,a[u])}return n},clone:function(t){var n={};for(var e in t)n[e]=p(t[e]);return n},append:function(t){for(var n=1,e=arguments.length;e>n;n++){var r=arguments[n]||{};for(var i in r)t[i]=r[i]}return t}}),["Object","WhiteSpace","TextNode","Collection","Arguments"].each(function(t){new o(t)});var v=Date.now();String.extend("uniqueID",function(){return(v++).toString(36)})})(),Array.implement({every:function(t,n){for(var e=0,r=this.length>>>0;r>e;e++)if(e in this&&!t.call(n,this[e],e,this))return!1;return!0},filter:function(t,n){for(var e,r=[],i=0,o=this.length>>>0;o>i;i++)i in this&&(e=this[i],t.call(n,e,i,this)&&r.push(e));return r},indexOf:function(t,n){for(var e=this.length>>>0,r=0>n?Math.max(0,e+n):n||0;e>r;r++)if(this[r]===t)return r;return-1},map:function(t,n){for(var e=this.length>>>0,r=Array(e),i=0;e>i;i++)i in this&&(r[i]=t.call(n,this[i],i,this));return r},some:function(t,n){for(var e=0,r=this.length>>>0;r>e;e++)if(e in this&&t.call(n,this[e],e,this))return!0;return!1},clean:function(){return this.filter(function(t){return null!=t})},invoke:function(t){var n=Array.slice(arguments,1);return this.map(function(e){return e[t].apply(e,n)})},associate:function(t){for(var n={},e=Math.min(this.length,t.length),r=0;e>r;r++)n[t[r]]=this[r];return n},link:function(t){for(var n={},e=0,r=this.length;r>e;e++)for(var i in t)if(t[i](this[e])){n[i]=this[e],delete t[i];break}return n},contains:function(t,n){return-1!=this.indexOf(t,n)},append:function(t){return this.push.apply(this,t),this},getLast:function(){return this.length?this[this.length-1]:null},getRandom:function(){return this.length?this[Number.random(0,this.length-1)]:null},include:function(t){return this.contains(t)||this.push(t),this},combine:function(t){for(var n=0,e=t.length;e>n;n++)this.include(t[n]);return this},erase:function(t){for(var n=this.length;n--;)this[n]===t&&this.splice(n,1);return this},empty:function(){return this.length=0,this},flatten:function(){for(var t=[],n=0,e=this.length;e>n;n++){var r=typeOf(this[n]);"null"!=r&&(t=t.concat("array"==r||"collection"==r||"arguments"==r||instanceOf(this[n],Array)?Array.flatten(this[n]):this[n]))}return t},pick:function(){for(var t=0,n=this.length;n>t;t++)if(null!=this[t])return this[t];return null},hexToRgb:function(t){if(3!=this.length)return null;var n=this.map(function(t){return 1==t.length&&(t+=t),t.toInt(16)});return t?n:"rgb("+n+")"},rgbToHex:function(t){if(3>this.length)return null;if(4==this.length&&0==this[3]&&!t)return"transparent";for(var n=[],e=0;3>e;e++){var r=(this[e]-0).toString(16);n.push(1==r.length?"0"+r:r)}return t?n:"#"+n.join("")}}),String.implement({test:function(t,n){return("regexp"==typeOf(t)?t:RegExp(""+t,n)).test(this)},contains:function(t,n){return n?(n+this+n).indexOf(n+t+n)>-1:(this+"").indexOf(t)>-1},trim:function(){return(this+"").replace(/^\s+|\s+$/g,"")},clean:function(){return(this+"").replace(/\s+/g," ").trim()},camelCase:function(){return(this+"").replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()})},hyphenate:function(){return(this+"").replace(/[A-Z]/g,function(t){return"-"+t.charAt(0).toLowerCase()})},capitalize:function(){return(this+"").replace(/\b[a-z]/g,function(t){return t.toUpperCase()})},escapeRegExp:function(){return(this+"").replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},toInt:function(t){return parseInt(this,t||10)},toFloat:function(){return parseFloat(this)},hexToRgb:function(t){var n=(this+"").match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return n?n.slice(1).hexToRgb(t):null},rgbToHex:function(t){var n=(this+"").match(/\d{1,3}/g);return n?n.rgbToHex(t):null},substitute:function(t,n){return(this+"").replace(n||/\\?\{([^{}]+)\}/g,function(n,e){return"\\"==n.charAt(0)?n.slice(1):null!=t[e]?t[e]:""})}}),Number.implement({limit:function(t,n){return Math.min(n,Math.max(t,this))},round:function(t){return t=Math.pow(10,t||0).toFixed(0>t?-t:0),Math.round(this*t)/t},times:function(t,n){for(var e=0;this>e;e++)t.call(n,e,this)},toFloat:function(){return parseFloat(this)},toInt:function(t){return parseInt(this,t||10)}}),Number.alias("each","times"),function(t){var n={};t.each(function(t){Number[t]||(n[t]=function(){return Math[t].apply(null,[this].concat(Array.from(arguments)))})}),Number.implement(n)}(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]),Function.extend({attempt:function(){for(var t=0,n=arguments.length;n>t;t++)try{return arguments[t]()}catch(e){}return null}}),Function.implement({attempt:function(t,n){try{return this.apply(n,Array.from(t))}catch(e){}return null},bind:function(t){var n=this,e=arguments.length>1?Array.slice(arguments,1):null,r=function(){},i=function(){var o=t,a=arguments.length;this instanceof i&&(r.prototype=n.prototype,o=new r);var u=e||a?n.apply(o,e&&a?e.concat(Array.slice(arguments)):e||arguments):n.call(o);return o==t?u:o};return i},pass:function(t,n){var e=this;return null!=t&&(t=Array.from(t)),function(){return e.apply(n,t||arguments)}},delay:function(t,n,e){return setTimeout(this.pass(null==e?[]:e,n),t)},periodical:function(t,n,e){return setInterval(this.pass(null==e?[]:e,n),t)}}),function(){var t=Object.prototype.hasOwnProperty;Object.extend({subset:function(t,n){for(var e={},r=0,i=n.length;i>r;r++){var o=n[r];o in t&&(e[o]=t[o])}return e},map:function(n,e,r){var i={};for(var o in n)t.call(n,o)&&(i[o]=e.call(r,n[o],o,n));return i},filter:function(n,e,r){var i={};for(var o in n){var a=n[o];t.call(n,o)&&e.call(r,a,o,n)&&(i[o]=a)}return i},every:function(n,e,r){for(var i in n)if(t.call(n,i)&&!e.call(r,n[i],i))return!1;return!0},some:function(n,e,r){for(var i in n)if(t.call(n,i)&&e.call(r,n[i],i))return!0;return!1},keys:function(n){var e=[];for(var r in n)t.call(n,r)&&e.push(r);return e},values:function(n){var e=[];for(var r in n)t.call(n,r)&&e.push(n[r]);return e},getLength:function(t){return Object.keys(t).length},keyOf:function(n,e){for(var r in n)if(t.call(n,r)&&n[r]===e)return r;return null},contains:function(t,n){return null!=Object.keyOf(t,n)},toQueryString:function(t,n){var e=[];return Object.each(t,function(t,r){n&&(r=n+"["+r+"]");var i;switch(typeOf(t)){case"object":i=Object.toQueryString(t,r);break;case"array":var o={};t.each(function(t,n){o[n]=t}),i=Object.toQueryString(o,r);break;default:i=r+"="+encodeURIComponent(t)}null!=t&&e.push(i)}),e.join("&")}})}(),function(){var t=this.Class=new Type("Class",function(r){instanceOf(r,Function)&&(r={initialize:r});var i=function(){if(e(this),i.$prototyping)return this;this.$caller=null;var t=this.initialize?this.initialize.apply(this,arguments):this;return this.$caller=this.caller=null,t}.extend(this).implement(r);return i.$constructor=t,i.prototype.$constructor=i,i.prototype.parent=n,i}),n=function(){if(!this.$caller)throw Error('The method "parent" cannot be called.');var t=this.$caller.$name,n=this.$caller.$owner.parent,e=n?n.prototype[t]:null;if(!e)throw Error('The method "'+t+'" has no parent.');return e.apply(this,arguments)},e=function(t){for(var n in t){var r=t[n];switch(typeOf(r)){case"object":var i=function(){};i.prototype=r,t[n]=e(new i);break;case"array":t[n]=r.clone()}}return t},r=function(t,n,e){e.$origin&&(e=e.$origin);var r=function(){if(e.$protected&&null==this.$caller)throw Error('The method "'+n+'" cannot be called.');var t=this.caller,i=this.$caller;this.caller=i,this.$caller=r;var o=e.apply(this,arguments);return this.$caller=i,this.caller=t,o}.extend({$owner:t,$origin:e,$name:n});return r},i=function(n,e,i){if(t.Mutators.hasOwnProperty(n)&&(e=t.Mutators[n].call(this,e),null==e))return this;if("function"==typeOf(e)){if(e.$hidden)return this;this.prototype[n]=i?e:r(this,n,e)}else Object.merge(this.prototype,n,e);return this},o=function(t){t.$prototyping=!0;var n=new t;return delete t.$prototyping,n};t.implement("implement",i.overloadSetter()),t.Mutators={Extends:function(t){this.parent=t,this.prototype=o(t)},Implements:function(t){Array.from(t).each(function(t){var n=new t;for(var e in n)i.call(this,e,n[e],!0)},this)}}}(),function(){this.Chain=new Class({$chain:[],chain:function(){return this.$chain.append(Array.flatten(arguments)),this},callChain:function(){return this.$chain.length?this.$chain.shift().apply(this,arguments):!1},clearChain:function(){return this.$chain.empty(),this}});var t=function(t){return t.replace(/^on([A-Z])/,function(t,n){return n.toLowerCase()})};this.Events=new Class({$events:{},addEvent:function(n,e,r){return n=t(n),this.$events[n]=(this.$events[n]||[]).include(e),r&&(e.internal=!0),this},addEvents:function(t){for(var n in t)this.addEvent(n,t[n]);return this},fireEvent:function(n,e,r){n=t(n);var i=this.$events[n];return i?(e=Array.from(e),i.each(function(t){r?t.delay(r,this,e):t.apply(this,e)},this),this):this},removeEvent:function(n,e){n=t(n);var r=this.$events[n];if(r&&!e.internal){var i=r.indexOf(e);-1!=i&&delete r[i]}return this},removeEvents:function(n){var e;if("object"==typeOf(n)){for(e in n)this.removeEvent(e,n[e]);return this}n&&(n=t(n));for(e in this.$events)if(!n||n==e)for(var r=this.$events[e],i=r.length;i--;)i in r&&this.removeEvent(e,r[i]);return this}}),this.Options=new Class({setOptions:function(){var t=this.options=Object.merge.apply(null,[{},this.options].append(arguments));if(this.addEvent)for(var n in t)"function"==typeOf(t[n])&&/^on[A-Z]/.test(n)&&(this.addEvent(n,t[n]),delete t[n]);return this}})}(),"undefined"==typeof JSON&&(this.JSON={}),function(){var special={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},escape=function(t){return special[t]||"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)};JSON.validate=function(t){return t=t.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""),/^[\],:{}\s]*$/.test(t)},JSON.encode=JSON.stringify?function(t){return JSON.stringify(t)}:function(t){switch(t&&t.toJSON&&(t=t.toJSON()),typeOf(t)){case"string":return'"'+t.replace(/[\x00-\x1f\\"]/g,escape)+'"';case"array":return"["+t.map(JSON.encode).clean()+"]";case"object":case"hash":var n=[];return Object.each(t,function(t,e){var r=JSON.encode(t);r&&n.push(JSON.encode(e)+":"+r)}),"{"+n+"}";case"number":case"boolean":return""+t;case"null":return"null"}return null},JSON.decode=function(string,secure){if(!string||"string"!=typeOf(string))return null;if(secure||JSON.secure){if(JSON.parse)return JSON.parse(string);if(!JSON.validate(string))throw Error("JSON could not decode the input; security is enabled and the value is not secure.")}return eval("("+string+")")}}()},{}]},{},[]),require=function(t,n,e){function r(e,o){if(!n[e]){if(!t[e]){var a="function"==typeof require&&require;if(!o&&a)return a(e,!0);if(i)return i(e,!0);throw Error("Cannot find module '"+e+"'")}var u=n[e]={exports:{}};t[e][0].call(u.exports,function(n){var i=t[e][1][n];return r(i?i:n)},u,u.exports)}return n[e].exports}for(var i="function"==typeof require&&require,o=0;e.length>o;o++)r(e[o]);return r}({colors:[function(t,n){n.exports=t("Vne/YO")},{}],"Vne/YO":[function(t,n,e){function i(t){return function(){if(!u)return this.replace(/( )/,"$1");var n=this.split("");return n=n.map(t),n.join("")}}function o(t,n){if("console"==e.mode)var r={bold:["",""],italic:["",""],underline:["",""],inverse:["",""],white:["",""],grey:["",""],black:["",""],blue:["",""],cyan:["",""],green:["",""],magenta:["",""],red:["",""],yellow:["",""]};else if("browser"==e.mode)var r={bold:["<b>","</b>"],italic:["<i>","</i>"],underline:["<u>","</u>"],inverse:['<span style="background-color:black;color:white;">',"</span>"],white:['<span style="color:white;">',"</span>"],grey:['<span style="color:grey;">',"</span>"],black:['<span style="color:black;">',"</span>"],blue:['<span style="color:blue;">',"</span>"],cyan:['<span style="color:cyan;">',"</span>"],green:['<span style="color:green;">',"</span>"],magenta:['<span style="color:magenta;">',"</span>"],red:['<span style="color:red;">',"</span>"],yellow:['<span style="color:yellow;">',"</span>"]};else{if("none"==e.mode)return t;console.log('unsupported mode, try "browser", "console" or "none"')}return r[n][0]+t+r[n][1]}function a(t){function n(t){return r=Math.floor(Math.random()*t)}function e(t){var n=!1;return a.filter(function(e){n=e==t}),n}function i(t,r){result="",r=r||{},r.up=r.up||!0,r.mid=r.mid||!0,r.down=r.down||!0,r.size=r.size||"maxi";var i;t=t.split("");for(var a in t)if(!e(a)){switch(result+=t[a],i={up:0,down:0,mid:0},r.size){case"mini":i.up=n(8),i.min=n(2),i.down=n(8);break;case"maxi":i.up=n(16)+3,i.min=n(4)+1,i.down=n(64)+3;break;default:i.up=n(8)+1,i.mid=n(6)/2,i.down=n(8)+1}var u=["up","mid","down"];for(var s in u)for(var c=u[s],l=0;i[c]>=l;l++)r[c]&&(result+=o[c][n(o[c].length)])}return result}var o={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},a=[].concat(o.up,o.down,o.mid);return i(t)}var u=!1;if(n!==void 0&&(u=!0),u)e.mode="console";else{var e={},n={};e.mode="browser"}var s=function(t,n){e[t]=function(t){return n.apply(t)},String.prototype.__defineGetter__(t,n)},c=["bold","underline","italic","inverse","grey","black","yellow","red","green","blue","white","cyan","magenta"];c.forEach(function(t){s(t,function(){return o(this,t)})});var l=function(){var t=["red","yellow","green","blue","magenta"];return function(n,e){return" "==n?n:o(n,t[e++%t.length])}}();e.addSequencer=function(t,n){s(t,i(n))},e.addSequencer("rainbow",l),e.addSequencer("zebra",function(t,n){return 0===n%2?t:t.inverse}),e.setTheme=function(t){Object.keys(t).forEach(function(n){s(n,function(){return e[t[n]](this)})})},s("zalgo",function(){return a(this)}),s("stripColors",function(){return(""+this).replace(/\u001b\[\d+m/g,"")})},{}]},{},[]),require("mootools"),require("colors");var foo=new Class({Implements:[Options,Events],initialize:function(t){this.setOptions(t),this.fireEvent("ready")},log:function(t){console.log("[LOG] ".red,t)}});new foo({onReady:function(){this.log("ready")}});
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; }
body, html { height: 100%; width: 100%; }</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment