/*BootLoader*/
var BootLoader=(function namespace(){
    function Init(setting){
        if(typeof(setting)=="object"){
            config.noconsole=!!setting.NoMessage;
        }
    }
    Init.prototype.loadJS=function(scripts,callback){
        //check
        if(!Array.isArray(scripts)){
            console.error("First parameter has to be an array of string, represent the JavaScript files that needs to be loaded.");
            return;
        }
        if(callback&&typeof(callback)!="function"){
            console.error("Second parameter is optional, and has to be an function that will be called after all JavaScript files is loaded.");
            return;
        }
        //load
        reset(scripts.length,callback,null);
        for(var i in scripts){
            var script=document.createElement("script");
            if(script.readyState){      //IE
                script.onreadystate=function(){
                    if(script.readyState=="loaded"||script.readyState=="complete"){
                        script.onreadystate=null;
                        checkLoad();
                    }
                };
            }else{
                script.onload=function(){
                    checkLoad();
                };
            }
            script.src=String(scripts[i]);
            document.getElementsByTagName("head")[0].appendChild(script);
        }
    };
    Init.prototype.loadImage=function(images,callback){
        //check
        //load
        reset(images.length,callback,new Array(images.length));
        for(var i in images){
            var img=new Image();
            img.crossOrigin="Anonymous";
            img.onload=(function(idx){
                return function(e){
                    var canvas=document.createElement("canvas");
                    canvas.width=this.naturalWidth;
                    canvas.height=this.naturalHeight;
                    canvas.getContext("2d").drawImage(this,0,0);
                    config.result[idx]=canvas.toDataURL();
                    checkLoad();
                };
            })(i);
            img.src=images[i];
        }
    };
    function checkLoad(){
        config.loadedCount++;
        if(config.loadedCount==config.targetCount){
            config.callback&&config.callback.call(this,config.result);
        }
    }
    function reset(count,callback,result){
        config.callback=callback;
        config.targetCount=count;
        config.loadedCount=0;
        config.result=result;
    }
    var config={
        callback:null,
        targetCount:0,
        loadedCount:0,
        noconsole:false,
        result:null,
    };
    return Init;
}());

@@ -2128,24 +2128,1257 @@
    %7D%0A    %7D;%0A
+    Init.prototype.loadFont=function(fonts,callback)%7B%0A        //check%0A        //load%0A        reset(fonts.length,callback,null);%0A        function ArrayBufferToBase64(buffer) %7B%0A            var base64='';%0A            var bytes=new Uint8Array(buffer);%0A            for (var i=0;i%3Cbytes.byteLength;i++)%7B%0A                base64+=String.fromCharCode(bytes%5Bi%5D);%0A            %7D%0A            return window.btoa(base64);%0A        %7D%0A        for(var i in fonts)%7B%0A            var ajax=new XMLHttpRequest();%0A            ajax.responseType='arraybuffer';%0A            ajax.onreadystatechange=(function(idx)%7B%0A                return function(e)%7B%0A                    if(ajax.readyState==4&&ajax.status==200)%7B%0A                        var s=ArrayBufferToBase64(ajax.response);%0A                        var css=document.createElement(%22style%22);%0A                        css.innerHTML='@font-face%7Bfont-family:%22'+fonts%5Bidx%5D.fontFamily+'%22;src:url(data:'+fonts%5Bidx%5D.fontType+';base64,'+s+')%7D';%0A                        document.getElementsByTagName(%22head%22)%5B0%5D.appendChild(css);%0A                        checkLoad();%0A                    %7D%0A                %7D;%0A            %7D)(i);%0A            ajax.open(%22GET%22,fonts%5Bi%5D.fontUrl,true);%0A            ajax.send();%0A        %7D%0A    %7D;%0A
     function

add loadFont