document.write("");
window.waitforloading = true;
var loadingjs = function(){
this.initconfig();
this.inithtml();
this.initcss();
this.startloading();
this.onresize();
var self = this;
window.onresize =function(){
self.onresize();
};
window.settimeout(function(){window.waitforloading = false;},250);
}
loadingjs.prototype = {
inithtml : function(){
this.stop = false;
this.instance = document.createelement("div");
this.image = document.createelement("img");
this.image.src = this.loadingpicture;
this.title = document.createelement("p");
this.copyright = document.createelement("p");
this.copyright.setattribute("style", "position:absolute;bottom:5%;font-size:1.1rem;width:100%;text-align:center;");
if(window.userinfo && window.userinfo.copyright) this.copyright.innerhtml = window.userinfo.copyright;
this.bg = document.createelement("div");
this.bg.setattribute("style", "transform:scale(1);");
if(this.loadingpicture) this.instance.appendchild(this.image);
this.initanimationhtml();
this.instance.appendchild(this.title);
this.instance.appendchild(this.copyright);
this.bg.appendchild(this.instance);
document.body.appendchild(this.bg);
},
loadingsvg: function(){
// this.loadimageurl = "";
var loadimageurl = document.createelementns("http://www.w3.org/2000/svg", 'svg');
loadimageurl.setattribute("t", "1525916222299");
loadimageurl.setattribute("class", "icon");
loadimageurl.setattribute("style", "");
loadimageurl.setattribute("viewbox", "130 0 800 1024");
loadimageurl.setattribute("version", "1.1");
loadimageurl.setattribute("xmlns", "http://www.w3.org/2000/svg");
loadimageurl.setattribute("p-id", "2478");
loadimageurl.setattribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
loadimageurl.setattribute("width", "49");
loadimageurl.setattribute("height", "56");
var defs = document.createelementns("http://www.w3.org/2000/svg", 'defs');
var style = document.createelementns("http://www.w3.org/2000/svg", 'style');
style.setattribute("type", "text/css");
var path1 = document.createelementns("http://www.w3.org/2000/svg", 'path');
path1.setattribute("d", "m835.55027 48.761905c876.805122 48.761905 910.222223 81.441158 910.222223 121.753604l910.222223 902.095c910.222223 902.095 910.222223 942.409011 876.805 975.238095l113.777778 975.238095 113.777778 24.380952 88.888889 48.761905 835.55027 48.761905zm64 0 64 24.380952 64 1024l960 1024c835.55027 1024 904.277615 1024 960 969.325498l960 54.49204c960 54.49204 904.277615 0 835.55027 0l88.888889 0 64 0z");
path1.setattribute("p-id", "2479");
var path2 = document.createelementns("http://www.w3.org/2000/svg", 'path');
path2.setattribute("d", "m775.164361 219.428572c788.910114 219.428572 800.05325 208.512847 800.05325 195.047619 800.05325 181.582391 788.910114 170.666667 775.164361 170.666667l263.111111 170.666667c249.365357 170.666667 238.222222 181.582391 238.222222 195.047619 238.222222 208.512847 249.365357 219.428572 263.111111 219.428572l775.164361 219.428572z");
path2.setattribute("p-id", "2481");
var path3 = document.createelementns("http://www.w3.org/2000/svg", 'path');
path3.setattribute("d", "m775.164361 365.714285c788.910114 365.714285 800.05325 354.798562 800.05325 341.333333 800.05325 327.868105 788.910114 316.952382 775.164361 316.952382l263.111111 316.952382c249.365357 316.952382 238.222222 327.868105 238.222222 341.333333 238.222222 354.798562 249.365357 365.714285 263.111111 365.714285l775.164361 365.714285z");
path3.setattribute("p-id", "2482");
var path4 = document.createelementns("http://www.w3.org/2000/svg", 'path');
path4.setattribute("d", "m775.164361 536.380951c788.910114 536.380951 800.05325 525.465229 800.05325 512 800.05325 498.534771 788.910114 487.619049 775.164361 487.619049l263.111111 487.619049c249.365357 487.619049 238.222222 498.534771 238.222222 512 238.222222 525.465229 249.365357 536.380951 263.111111 536.380951l775.164361 536.380951z");
path4.setattribute("p-id", "2483");
defs.appendchild(style);
loadimageurl.appendchild(defs);
loadimageurl.appendchild(path1);
loadimageurl.appendchild(path2);
loadimageurl.appendchild(path3);
loadimageurl.appendchild(path4);
return loadimageurl;
},
initanimationhtml : function(){
if(!document.createelementns) return;
this.loadbox = document.createelement("div");
var img1 = this.loadingsvg();
var img2 = this.loadingsvg();
this.img3 = this.loadingsvg();
this.img3.setattribute("class", "loadingrun");
this.img3.setattribute("style", (
"position : absolute;" +
"left : 20px;" +
"top : 0;" +
"z-index : -1;" +
"-webkit-transform-origin : 0 0;" +
"-o-transform-origin : 0 0;" +
"-ms-transform-origin : 0 0;" +
"-moz-transform-origin : 0 0;" +
"transform-origin : 0 0;" +
"fill :" + this.loadingcaptioncolor + ";"
));
img2.setattribute("style", (
"position : absolute;" +
"left : 20px;" +
"top : 0;" +
"-webkit-transform:rotatey(180deg) scale(0.8);" +
"-o-transform:rotatey(180deg) scale(0.8);" +
"-ms-transform:rotatey(180deg) scale(0.8);" +
"-moz-transform:rotatey(180deg) scale(0.8);" +
"transform:rotatey(180deg) scale(0.8);" +
"-webkit-transform-origin : 0 0;" +
"-o-transform-origin : 0 0;" +
"-ms-transform-origin : 0 0;" +
"-moz-transform-origin : 0 0;" +
"transform-origin : 0 0;" +
"fill : " + this.loadingcaptioncolor + ";"
));
img1.setattribute("style", (
"position : absolute;" +
"left : 20px;" +
"top : 0;" +
"-webkit-transform:rotatey(0) scale(0.8);" +
"-o-transform:rotatey(0) scale(0.8);" +
"-ms-transform:rotatey(0) scale(0.8);" +
"-moz-transform:rotatey(0) scale(0.8);" +
"transform:rotatey(0) scale(0.8);" +
"-webkit-transform-origin : 0 0;" +
"-o-transform-origin : 0 0;" +
"-ms-transform-origin : 0 0;" +
"-moz-transform-origin : 0 0;" +
"transform-origin : 0 0;" +
"fill : " + this.loadingcaptioncolor + ";"
));
this.loadbox.appendchild(img1);
this.loadbox.appendchild(img2);
this.loadbox.appendchild(this.img3);
this.instance.appendchild(this.loadbox);
},
initconfig : function(){
this.loadingcaption, this.loadingcaptioncolor, this.loadingpicture;
try{
this.loadingcaption = bookconfig.loadingcaption ? bookconfig.loadingcaption : "loading";
this.loadingcaptioncolor = bookconfig.loadingcaptioncolor ? bookconfig.loadingcaptioncolor : "#dddddd";
this.loadingbackground = bookconfig.loadingbackground ? bookconfig.loadingbackground : "#1f2232";
this.loadingpicture = bookconfig.loadingpicture ? bookconfig.loadingpicture : "";
}catch(err){
this.loadingcaption = "loading";
this.loadingcaptioncolor = "#bdbdbd";
this.loadingbackground = "#1f2233";
this.loadingpicture = "";
}
},
startloading : function(){
this.title.innerhtml = document.title;
},
destroy : function(){
if(global.isie8()||global.isie9()){
$(this.bg).animate({"opacity":"0"},0.6,function(){
$("body>style").html("");
$(this.bg).remove();
$("body").css({"background-color" : ""});
}.bind(this));
}else{
animateonce($(this.bg) , {"opacity":"0"} , 0.6 ,function(){
$(this.img3).attr("class", "");
$("body>style").html("");
$(this.bg).remove();
$(this.image).attr("src", "");
$("body").css({"background-color" : ""});
}.bind(this));
}
},
initcss : function(){
document.getelementsbytagname("html")[0].setattribute("style",(
"margin : 0;" +
"padding : 0;" +
"width : 100%;" +
"height : 100%;"
));
document.body.setattribute("style", (
"margin : 0;" +
"padding : 0;" +
"width : 100%;" +
"height : 100%;" +
"position : fixed;" +
"background-color :" + this.loadingbackground + ";"
));
this.bg.setattribute("style", (
"margin : 0;" +
"padding : 0;" +
"width : 100%;" +
"height : 100%;" +
"position : fixed;" +
"background-color:" + this.loadingbackground + ";"
));
this.instance.setattribute("style", (
"width : 100%;" +
"height : 100%;" +
"color :" + this.loadingcaptioncolor + ";" +
"text-align : center;" +
"vertical-align : middle;" +
"font-family : tahoma;" +
"position : relative;"
));
this.image.setattribute("style", (
"position : absolute;" +
"bottom : 75%;" +
"left : 50%;" +
"-webkit-transform : translate(-50% , 50%);" +
"-moz-transform : translate(-50% , 50%);" +
"-ms-transform : translate(-50% , 50%);" +
"-o-transform : translate(-50% , 50%);" +
"transform : translate(-50% , 50%);" +
"margin-bottom : 28px;" +
"max-width : 40%;" +
"max-height : 30%;"
));
if(window.innerheight <= 300) this.image.style.display = "none";
var titletran = "translate(-50%, 20px)";
var loadingboxtran = "translate(-50% , -48.8px)";
// if(this.loadingpicture) {
// var titletran = "translate(-50%, 40px)";
// var loadingboxtran = "translate(-50% , -50%)";
// }
this.title.setattribute("style", (
"font-family:arial,helvetica,sans serif;" +
"font-size : 28px;" +
"position : absolute;" +
"top : 50%;" +
"left : 50%;" +
"-webkit-transform :" + titletran + ";" +
"-moz-transform :" + titletran + ";" +
"-ms-transform :" + titletran + ";" +
"-o-transform :" + titletran + ";" +
"transform :" +titletran + ";" +
"margin : 0;" +
"padding : 0;"
));
if(this.loadbox) this.loadbox.setattribute("style", (
"position:relative;" +
"perspective:200px;" +
"-webkit-transform-style:preserve-3d;" +
"-o-transform-style:preserve-3d;" +
"-ms-transform-style:preserve-3d;" +
"-moz-transform-style:preserve-3d;" +
"transform-style:preserve-3d;" +
"position : absolute;" +
"width : 39.2px;" +
"height : 44.8px;" +
"left : 50%;" +
"top : 50%;" +
"-webkit-transform : " +loadingboxtran + ";" +
"-moz-transform : " +loadingboxtran + ";" +
"-ms-transform : " +loadingboxtran + ";" +
"-o-transform : " +loadingboxtran + ";" +
"transform : " + loadingboxtran + ";" +
"padding : 0;"
));
},
onresize : function(){}
}
var jsloadingbar = new loadingjs();