/** Les contructors **/ var Twi = new function() { var extention = {}; var options = {}; this.cache = new Array(); this.apigoogle = false; /********************************************************/ /* Noyau */ /********************************************************/ this.setOption = function(){ this.options = { version : '1dev', sourceScript : 'https://api.twimmo.com/scriptjs/', client : '1', key : '434637352b5aa08da6a886b9fcb8ee9a' } for (var property in options){ this.options[property] = options[property]; } } this.setParam = function(options){ for (var property in options){ this.options[property] = options[property]; } } this.random = function(min, max){ return Math.floor(Math.random() * (max - min + 1) + min); } this.isObject = function(nom){ if(this[nom]){ return true; } return false; } this.addObject = function(nom){ if(!this[nom]){ this[nom] = {}; } } this.setFunction = function(nom,fonction){ if(!this[nom]){ if(this.isFunction){ this[nom] = fonction; } } } //Cr??er un espace dans le cache this.setEspaceCache = function(espace){ if(!Twi.cache[espace]){ Twi.cache[espace]= {}; } } /********************************************************/ /* Appel Librairie */ /********************************************************/ this.require = function (lib){ var libraryName = this.options.sourceScript + this.options.client +"-"+ this.options.key +"/"+ lib +'/core/apitwimmo' + lib + '.js'; try{ document.write('