Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 1.78 KB

File metadata and controls

60 lines (42 loc) · 1.78 KB

Extpatcher

image

Extpatcher is a CLI tool that creates portable patch bundles for unpacked Chrome extensions. Given an original folder and a modified folder, it produces a zip patch bundle you can apply later to reproduce the modified version exactly.

Requirements

  • Node.js 20 or newer
  • npm

Install

git clone https://github.com/minanagehsalalma/RevancedForChromeExtensions
cd RevancedForChromeExtensions
npm install

Build

npm run build

The CLI runs from dist/, so build once before using npm start.

Quick start

# Create a patch bundle
npm start -- make --original ./Original --modified ./Modified --out ./patch-bundle.zip

# Apply a patch bundle to a directory
npm start -- apply --patch ./patch-bundle.zip --in ./Original --out ./Patched

# Apply a patch bundle to a zip
npm start -- apply --patch ./patch-bundle.zip --in ./Original.zip --out ./Patched.zip

# Verify an input against a patch bundle
npm start -- verify --patch ./patch-bundle.zip --in ./Original

(you can use the ready patch directly from there)

npm run build
npm start -- make --original ./Original --modified ./Modified --out ./cookie-editor.patch.zip
npm start -- apply --patch ./cookie-editor.patch.zip --in ./Original --out ./Patched --check-against ./Modified

Tests

npm test

Notes

  • Patch bundles contain patch.json plus a payload/ folder with replacement file bytes.
  • Patched extensions cannot remain installed via the Chrome Web Store. Chrome will treat them as unpacked extensions; you must load them in Developer Mode.