Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIP not generated when running in Tampermonkey #2

Open
956MB opened this issue Jan 9, 2025 · 0 comments
Open

ZIP not generated when running in Tampermonkey #2

956MB opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@956MB
Copy link
Owner

956MB commented Jan 9, 2025

The ZIP feature doesn't seem to work at all when run in Tampermonkey, though running locally through the developer mode in Manage Extensions works fine. The code just seems to hang on the await zip.generateAsync({ type: "blob" }) line in content.js:

if (asZip && downloadedCount > 0) {
    console.log(`Generating zip file...`);

    const zipBlob = await zip.generateAsync({ type: "blob" });
    const sanitizeName = postTitle.replace(/[<>:"/\\|?*\x00-\x1F]/g, '').replace(/^\.+/, '').replace(/\.+$/, '').replace(/\.+/g, '.').trim();
    const zipFilename = `${sanitizeName}.zip`;
    await saveBlob(zipBlob, zipFilename);

    console.log(`Zip file downloaded: ${zipFilename}`);
}

Not sure if it's a permissions or meta key issue with Tampermonkey or what.

@956MB 956MB added the bug Something isn't working label Jan 9, 2025
@956MB 956MB self-assigned this Jan 9, 2025
956MB added a commit that referenced this issue Jan 9, 2025
- Still trying to figure out why jszip file creation isn't working in Tampermonkey, in the meantime pointing to a newly created issue #2
@956MB 956MB added bug Something isn't working and removed bug Something isn't working labels Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant