From de2f0e5c7daf11158d5c6ca0703f00f199f3555c Mon Sep 17 00:00:00 2001 From: Marc Robledo Date: Sun, 11 Aug 2024 21:30:25 +0200 Subject: [PATCH] - feat (web): dynamic JS modules loading - feat (web): added onloadpatch event - fix (cli): fixed path for JS files --- README.md | 4 +- _cache_service_worker.js | 2 +- index.html | 29 +- index_template.html | 31 +- rom-patcher-js/RomPatcher.webapp.js | 412 +++++++++++------- .../modules/RomPatcher.format.vcdiff.js | 13 +- test.js | 26 +- webapp/style.css | 5 +- webapp/webapp.js | 3 + 9 files changed, 315 insertions(+), 210 deletions(-) diff --git a/README.md b/README.md index 27afa0c..2218c63 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ A ROM patcher made in Javascript. Modders and hackers can embed Rom Patcher JS in their websites to provide an online ROM patcher for their patches, allowing users to patch ROMs without downloading any files.
- File [`index_template.html`](https://github.com/marcrobledo/RomPatcher.js/blob/master/index_template.html) includes a simple working example -- Read [the wiki](https://github.com/marcrobledo/RomPatcher.js/wiki) for more detailed instructions +- Read [the wiki](https://github.com/marcrobledo/RomPatcher.js/wiki/Embedding-Rom-Patcher-JS) for more detailed instructions   @@ -36,7 +36,7 @@ Install dependencies: Patch a ROM: > node index.js patch "my_rom.bin" "my_patch.ips" -Create a patch: +Create an IPS patch: > node index.js create "original_rom.bin" modified_rom.bin" Show all options: diff --git a/_cache_service_worker.js b/_cache_service_worker.js index b58c103..5585263 100644 --- a/_cache_service_worker.js +++ b/_cache_service_worker.js @@ -6,7 +6,7 @@ */ var PRECACHE_ID = 'rom-patcher-js'; -var PRECACHE_VERSION = 'v30beta1b'; +var PRECACHE_VERSION = 'v30rc1'; var PRECACHE_URLS = [ '/RomPatcher.js/', '/RomPatcher.js/index.html', '/RomPatcher.js/manifest.json', diff --git a/index.html b/index.html index 7550696..153938d 100644 --- a/index.html +++ b/index.html @@ -34,21 +34,6 @@ - - - - - - - - - - - - - - - @@ -67,7 +52,7 @@
- +
@@ -98,7 +83,7 @@
- +
@@ -120,21 +105,21 @@
- +
- +
- @@ -147,7 +132,7 @@
- +
@@ -166,7 +151,7 @@
- Rom Patcher JS v3.0 Beta 1 by Marc Robledo + Rom Patcher JS v3.0 RC1 by Marc Robledo
See on GitHub Donate diff --git a/index_template.html b/index_template.html index 2613e1a..eb308c6 100644 --- a/index_template.html +++ b/index_template.html @@ -10,22 +10,9 @@ - - - - - - - - - - - - - - +