A browser extension to read and render patch/diff files using diff2html.
- 📄 Upload
.patchor.difffiles - ✏️ Manually input patch/diff content
- 🔄 Real-time diff rendering with diff2html
- 📐 Side-by-side (左右布局) and line-by-line (上下布局) view modes
- 💾 Auto-save content and layout preference
- 🌐 Fully offline - no external dependencies
- Download the latest Chrome extension from Releases
- Extract the zip file
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the extracted folder
- Download the latest Edge extension from Releases
- Extract the zip file
- Open Edge and go to
edge://extensions/ - Enable "Developer mode" in the left sidebar
- Click "Load unpacked" and select the extracted folder
- Click the extension icon in your browser toolbar
- A new tab will open with the Patch Reader interface
- Either:
- Click "上传文件" to upload a
.patchor.difffile - Paste diff content directly into the text area
- Click "上传文件" to upload a
- The diff will be rendered automatically in the preview panel
- Use the layout toggle buttons to switch between side-by-side and line-by-line views
- Node.js 22.x or later
- npm
# Install dependencies
npm install
# Build extensions
npm run build
# Build only Chrome extension
npm run build:chrome
# Build only Edge extension
npm run build:edgepatchReader-extension/
├── src/
│ ├── common/ # Shared files (copied to both browsers during build)
│ │ ├── diff-viewer.html
│ │ ├── diff-viewer.js
│ │ ├── styles.css
│ │ ├── icons/
│ │ └── lib/ # diff2html library
│ ├── chrome/ # Chrome-specific files
│ │ ├── manifest.json
│ │ └── background.js
│ └── edge/ # Edge-specific files
│ ├── manifest.json
│ └── background.js
├── scripts/
│ └── build.js # Build script
└── package.json
MIT License - see LICENSE for details.