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

Change form submission to not redirect to new page #5

Open
hannah-martinez opened this issue Nov 5, 2024 · 1 comment
Open

Change form submission to not redirect to new page #5

hannah-martinez opened this issue Nov 5, 2024 · 1 comment

Comments

@hannah-martinez
Copy link
Member

No description provided.

@j6k4m8
Copy link
Member

j6k4m8 commented Nov 5, 2024

Can do this with a few lines of JS:

const a = document.createElement('a');
a.href = url;
a.download = 'annotations.json';
document.body.appendChild(a);
a.click();
URL.revokeObjectURL(url);

https://github.com/aplbrain/webpaint/blob/fcfe7d86408d78fc8036d00a5165f1960968b685/src/routes/standalone/%2Bpage.svelte#L53-L58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants