This commit is contained in:
libccy 2016-03-26 18:01:14 +08:00
parent 855b7f2d99
commit eb00081e6e
2 changed files with 58 additions and 20 deletions

View File

@ -2834,7 +2834,7 @@
} }
} }
} }
if(scripts[i].src.indexOf('asset')!=-1){ if(scripts[i].src.indexOf('cordova')!=-1){
lib.assetLoading=[]; lib.assetLoading=[];
} }
break; break;
@ -3200,27 +3200,29 @@
navigator.app.exitApp(); navigator.app.exitApp();
} }
}); });
window.resolveLocalFileSystemURL(cordova.file.externalApplicationStorageDirectory,function(entry){ if(window.resolveLocalFileSystemURL){
var url=entry.toURL(); window.resolveLocalFileSystemURL(cordova.file.externalApplicationStorageDirectory,function(entry){
if(Array.isArray(lib.assetLoading)){ var url=entry.toURL();
for(var i=0;i<lib.assetLoading.length;i++){ if(Array.isArray(lib.assetLoading)){
var item=lib.assetLoading[i]; for(var i=0;i<lib.assetLoading.length;i++){
if(typeof item=='string'){ var item=lib.assetLoading[i];
ui.fontsheet.sheet.insertRule("@font-face {font-family: '"+item+"';src: url('"+url+"font/"+item+".ttf');}",0); if(typeof item=='string'){
} ui.fontsheet.sheet.insertRule("@font-face {font-family: '"+item+"';src: url('"+url+"font/"+item+".ttf');}",0);
else if(item._cordovaimg){ }
item.style.backgroundImage='url("'+url+item._cordovaimg+'")'; else if(item._cordovaimg){
delete item._cordovaimg; item.style.backgroundImage='url("'+url+item._cordovaimg+'")';
} delete item._cordovaimg;
else if(item._cordovasrc){ }
item.src=url+item._cordovasrc; else if(item._cordovasrc){
delete item._cordovasrc; item.src=url+item._cordovasrc;
delete item._cordovasrc;
}
} }
} }
} delete lib.assetLoading;
delete lib.assetLoading; lib.assetURL=url;
lib.assetURL=url; });
}); }
} }
} }
}, },

36
manifest.json Normal file
View File

@ -0,0 +1,36 @@
{
"name": "noname",
"xwalk_version": "1.8.0",
"xwalk_app_version": "1.8.0",
"xwalk_package_id": "com.widget.noname_full",
"xwalk_android_keep_screen_on":true,
"start_url": "index.html",
"icons": [
{
"src": "../res/icon/icon-256.png",
"sizes": "192x192",
"type": "image/png",
"density": "1.3"
},
{
"src": "../res/icon/icon-256.png",
"sizes": "144x144",
"type": "image/png",
"density": "1.8"
},
{
"src": "../res/icon/icon-256.png",
"sizes": "96x96",
"type": "image/png",
"density": "2.7"
},
{
"src": "../res/icon/icon-256.png",
"sizes": "72x72",
"type": "image/png",
"density": "3.6"
}
],
"display": "fullscreen",
"orientation": "landscape"
}