v1.9.16.1

This commit is contained in:
libccy 2017-03-27 01:14:19 +08:00
parent 2821866c39
commit 7697ad17f1
2 changed files with 29 additions and 17 deletions

View File

@ -5643,6 +5643,17 @@
} }
}; };
window.onload=function(){ window.onload=function(){
if(lib.device){
var script=document.createElement('script');
script.src='cordova.js';
document.body.appendChild(script);
document.addEventListener('deviceready',function(){
if(lib.init.cordovaReady){
lib.init.cordovaReady();
delete lib.init.cordovaReady;
}
});
}
if(_status.packLoaded){ if(_status.packLoaded){
delete _status.packLoaded; delete _status.packLoaded;
lib.init.onload(); lib.init.onload();
@ -6428,17 +6439,6 @@
} }
}, },
onload:function(){ onload:function(){
if(lib.device){
var script=document.createElement('script');
script.src='cordova.js';
document.body.appendChild(script);
document.addEventListener('deviceready',function(){
if(lib.init.cordovaReady){
lib.init.cordovaReady();
delete lib.init.cordovaReady;
}
});
}
if(navigator.userAgent.toLowerCase().indexOf('crosswalk')!=-1){ if(navigator.userAgent.toLowerCase().indexOf('crosswalk')!=-1){
lib.crosswalk=true; lib.crosswalk=true;
} }
@ -20362,16 +20362,29 @@
} }
download(); download();
}, },
multiDownload:function(list){ multiDownload:function(list,onsuccess,onerror,onfinish,process,dev){
var args=Array.from(arguments); var args=Array.from(arguments);
if(list.length<=3){ if(list.length<=3){
game.multiDownload2.apply(this,args); game.multiDownload2.apply(this,args);
} }
else{ else{
var num=Math.round(list.length/3); var num=Math.round(list.length/3);
args[0]=list.slice(0,num);game.multiDownload2.apply(this,args); var left=3;
args[0]=list.slice(num,2*num);game.multiDownload2.apply(this,args); args[3]=function(){
args[0]=list.slice(2*num);game.multiDownload2.apply(this,args); left--;
if(left==0){
onfinish();
}
};
setTimeout(function(){
args[0]=list.slice(0,num);game.multiDownload2.apply(game,args);
});
setTimeout(function(){
args[0]=list.slice(num,2*num);game.multiDownload2.apply(this,args);
},200);
setTimeout(function(){
args[0]=list.slice(2*num);game.multiDownload2.apply(this,args);
},400);
} }
}, },
fetch:function(url,onload,onerror,onprogress){ fetch:function(url,onload,onerror,onprogress){

View File

@ -1,9 +1,8 @@
window.noname_update={ window.noname_update={
version:'1.9.16', version:'1.9.16.1',
update:'1.9.15', update:'1.9.15',
changeLog:[ changeLog:[
'bug修复', 'bug修复',
'扩展下载进度',
'提高文件下载速度' '提高文件下载速度'
], ],
files:[ files:[