diff --git a/_cache_service_worker.js b/_cache_service_worker.js index 52004c1..c52dc42 100644 --- a/_cache_service_worker.js +++ b/_cache_service_worker.js @@ -14,7 +14,7 @@ */ var PRECACHE_ID='rom-patcher-js'; -var PRECACHE_VERSION='v28b'; +var PRECACHE_VERSION='v281'; var PRECACHE_URLS=[ '/RomPatcher.js/','/RomPatcher.js/index.html', '/RomPatcher.js/manifest.json', diff --git a/index.html b/index.html index 535e1e2..27be2a9 100644 --- a/index.html +++ b/index.html @@ -180,7 +180,7 @@ - Rom Patcher JS v2.8 by Marc Robledo + Rom Patcher JS v2.8.1 by Marc Robledo
See on GitHub Donate diff --git a/js/RomPatcher.js b/js/RomPatcher.js index 66652a0..f174c74 100644 --- a/js/RomPatcher.js +++ b/js/RomPatcher.js @@ -1,4 +1,4 @@ -/* Rom Patcher JS v20230331 - Marc Robledo 2016-2023 - http://www.marcrobledo.com/license */ +/* Rom Patcher JS v20230406 - Marc Robledo 2016-2023 - http://www.marcrobledo.com/license */ const TOO_BIG_ROM_SIZE=67108863; const HEADERS_INFO=[ @@ -141,7 +141,7 @@ function fetchPatch(customPatchIndex, compressedFileIndex){ patchFile=CUSTOM_PATCHER[customPatchIndex].fetchedFile=new MarcFile(arrayBuffer); patchFile.fileName=customPatch.file.replace(/^.*[\/\\]/g,''); - if(patchFile.getExtension()==='zip' && patchFile.readString(4).startsWith(ZIP_MAGIC)) + if(patchFile.getExtension()!=='jar' && patchFile.readString(4).startsWith(ZIP_MAGIC)) ZIPManager.parseFile(CUSTOM_PATCHER[customPatchIndex].fetchedFile, compressedFileIndex); else parseCustomPatch(CUSTOM_PATCHER[customPatchIndex]); @@ -161,7 +161,7 @@ function fetchPatch(customPatchIndex, compressedFileIndex){ patchFile=CUSTOM_PATCHER[customPatchIndex].fetchedFile=new MarcFile(xhr.response); patchFile.fileName=customPatch.file.replace(/^.*[\/\\]/g,''); - if(patchFile.getExtension()==='zip' && patchFile.readString(4).startsWith(ZIP_MAGIC)) + if(patchFile.getExtension()!=='jar' && patchFile.readString(4).startsWith(ZIP_MAGIC)) ZIPManager.parseFile(CUSTOM_PATCHER[customPatchIndex].fetchedFile, compressedFileIndex); else parseCustomPatch(CUSTOM_PATCHER[customPatchIndex]); @@ -184,7 +184,7 @@ function _parseROM(){ el('checkbox-addheader').checked=false; el('checkbox-removeheader').checked=false; - if(romFile.getExtension()==='zip' && romFile.readString(4).startsWith(ZIP_MAGIC)){ + if(romFile.getExtension()!=='jar' && romFile.readString(4).startsWith(ZIP_MAGIC)){ ZIPManager.parseFile(romFile); setTabApplyEnabled(false); }else{ @@ -653,7 +653,7 @@ function _readPatchFile(){ patchFile.littleEndian=false; var header=patchFile.readString(6); - if(patchFile.getExtension()==='zip' && header.startsWith(ZIP_MAGIC)){ + if(patchFile.getExtension()!=='jar' && header.startsWith(ZIP_MAGIC)){ patch=false; validateSource(); setTabApplyEnabled(false);