From 1eea54de7d15831fbb23ca6514321ba89658dc5b Mon Sep 17 00:00:00 2001 From: libccy Date: Sun, 15 May 2016 01:59:16 +0800 Subject: [PATCH] fix --- game/game.js | 27 ++++++++++++++++++++++++--- game/update.js | 2 +- layout/default/menu.css | 1 + 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/game/game.js b/game/game.js index 865bc701f..c28b11d82 100755 --- a/game/game.js +++ b/game/game.js @@ -3538,7 +3538,7 @@ var fileTransfer = new FileTransfer(); url=lib.updateURL+url; folder=lib.assetURL+folder; - fileTransfer.download(encodeURI(url),folder,onsuccess,onerror); + fileTransfer.download(encodeURI(url),encodeURI(folder),onsuccess,onerror); }; } } @@ -20732,7 +20732,13 @@ throw('err'); } _status.importingExtension=true; - lib.init.js('extension/'+extname,'extension',function(){ + var deletegame=false; + if(!window.game){ + window.game=game; + deletegame=true; + } + lib.init.js(lib.assetURL+'extension/'+extname,'extension',function(){ + if(deletegame) delete window.game; _status.importingExtension=false; if(!game.importedPack) throw('err'); if(lib.config.extensions.contains(extname)){ @@ -20749,6 +20755,7 @@ delete game.importedPack; onsuccess(); },function(){ + if(deletegame) delete window.game; _status.importingExtension=false; onerror(); }); @@ -20786,6 +20793,12 @@ node.update=function(){ if(!game.download) return; + var buttons=page.querySelectorAll('.menubutton.text.active'); + for(var i=0;i.menu-content>div>.left.pane>.menubutton.off{ opacity: 0.5;