Browser userscript for packaging manga chapters into CBZ/ZIP archives with one click
triggers
["how do I use the MangaSnap OneClick userscript","install LuminaCBZ manga downloader","configure mangasnap chapter archiver","customize CBZ export naming patterns","troubleshoot manga userscript issues","batch download manga chapters as cbz","set up tampermonkey manga script","archive manga chapters offline"]
MangaSnap-OneClick (branded as LuminaCBZ) is a browser userscript that enables one-click packaging of manga chapters into CBZ or ZIP archives for offline reading. It detects chapter boundaries, fetches all pages, and assembles them into properly named archives entirely client-side.
Parallel page fetching: Concurrent downloads with configurable parallelism
Client-side processing: No external servers, all in-browser
Multi-language UI: Auto-detects browser locale
Configuration
Basic Configuration Object
The script exposes a global configuration object that can be customized before page load:
// Add this to Tampermonkey as a separate script, or inject via console// Must execute BEFORE the main script loadswindow.__LUMINA_CONFIG__ = {
format: 'cbz', // 'zip' or 'cbz'parallelism: 4, // max concurrent page requests (1-8 recommended)naming: 'seriesFirst', // 'seriesFirst' | 'numberFirst' | 'custom'customPattern: '{series}_Chapter_{chapter}_vol_{volume}.cbz'
};
Navigate to a manga chapter page on a supported site
Wait for the "Package Chapter" button to appear (usually top-right overlay)
Click the button
Choose format (CBZ/ZIP) if prompted
Wait for progress bar to complete
Save the archive when browser download prompt appears
Adjusting Download Speed
For slower connections, reduce parallelism to avoid timeouts:
// In Tampermonkey dashboard, edit the script header section// Or inject before navigationwindow.__LUMINA_CONFIG__ = {
parallelism: 2// Reduce from default 4
};
For faster connections with stable bandwidth:
window.__LUMINA_CONFIG__ = {
parallelism: 6// Increase for faster archiving
};
Handling Failed Downloads
If a download fails or produces incomplete archives:
Check parallelism: Lower to 2-3 for unstable connections
Verify page count: Ensure all images loaded (scroll through chapter first)
Clear browser cache: Old cached images may interfere
Disable other extensions: Ad blockers or privacy tools may block requests
Check console errors: Open DevTools (F12) and check Console tab
// Force sequential download (slowest but most reliable)window.__LUMINA_CONFIG__ = {
parallelism: 1
};
Script Customization
Modifying Archive Compression
The script uses client-side ZIP compression. To adjust compression level (requires editing the userscript source):
// Find the compression function in the script// Modify the compression level (0-9)const zipOptions = {
type: 'blob',
compression: 'DEFLATE',
compressionOptions: {
level: 6// Default: 6 (0=no compression, 9=max compression)
}
};
Adding Custom Metadata to CBZ
CBZ archives can include ComicInfo.xml metadata. To add custom metadata (requires script modification):
// Add to the archive generation functionconst comicInfoXml = `<?xml version="1.0"?>
<ComicInfo>
<Title>${chapterTitle}</Title>
<Series>${seriesName}</Series>
<Number>${chapterNumber}</Number>
<Volume>${volumeNumber}</Volume>
<PageCount>${pageCount}</PageCount>
<Year>${newDate().getFullYear()}</Year>
</ComicInfo>`;
// Add to ZIP before finalizing
zip.file('ComicInfo.xml', comicInfoXml);
Extending to New Sites
To add support for additional manga hosting platforms (requires forking and modifying):
While the script is designed for single-chapter use, you can automate batch downloads:
// Run in browser console on manga series pageconst chapterLinks = document.querySelectorAll('.chapter-link');
const downloadDelay = 5000; // 5 seconds between chapters
chapterLinks.forEach((link, index) => {
setTimeout(() => {
window.location.href = link.href;
// Script will auto-trigger on new page// Use browser auto-download settings to save without prompt
}, index * downloadDelay);
});
Integrating with Download Managers
Configure browser to auto-save to specific folder:
Set browser download behavior to "Ask where to save" = OFF
Set default download location: ~/Manga/{series_name}/
// Check if global API existsif (window.LuminaCBZ) {
window.LuminaCBZ.onProgress((current, total) => {
console.log(`Downloaded ${current}/${total} pages`);
});
window.LuminaCBZ.onComplete((filename) => {
console.log(`Archive saved: ${filename}`);
// Trigger next action
});
}
Privacy & Security
All processing is client-side: No data sent to external servers
No telemetry: Script does not track usage or send analytics
Cookie inheritance: Uses existing browser session (must be logged in)
No credential access: Does not read passwords or authentication tokens
Temporary storage: Blob URLs garbage-collected after download
Environment Variables
The script runs entirely in-browser and does not use traditional environment variables. Configuration is done via JavaScript objects as shown above.
Browser Compatibility
Browser
Version
Status
Chrome
90+
✅ Fully supported
Firefox
110+
✅ Fully supported
Edge
90+
✅ Fully supported
Safari
16+
⚠️ Requires Userscripts extension
Opera
84+
✅ Fully supported
Brave
1.45+
✅ Fully supported
Mobile browsers: Limited support (use Kiwi Browser or Firefox Nightly on Android)
Common Use Cases
Archiving Before Series Removal
// Use batch approach to save all chapters before delisting// Set high-quality settingswindow.__LUMINA_CONFIG__ = {
format: 'cbz',
parallelism: 3,
customPattern: '{series}_Ch{chapter}_[ARCHIVE].cbz'
};
Reading on E-Readers
// Optimize for e-ink devices (prefer CBZ for reader compatibility)window.__LUMINA_CONFIG__ = {
format: 'cbz',
naming: 'seriesFirst'
};
Offline Backup
// Include metadata for organizationwindow.__LUMINA_CONFIG__ = {
format: 'cbz',
customPattern: '{year}-{series}_v{volume}_ch{chapter}.cbz'
};