ISMIS Helper: cross-browser build, CI, PDF fixes, Chrome download fix #1

Merged
adrianbonpin merged 55 commits from feat/ismis-helper into prod 2026-08-18 19:13:50 +00:00
Showing only changes of commit 4d7ff1a0e7 - Show all commits
+13 -2
View File
@@ -33,6 +33,17 @@ async function generatePdf(data) {
const url = URL.createObjectURL(blob); const url = URL.createObjectURL(blob);
const name = (data.header && data.header.fullName) || 'Student'; const name = (data.header && data.header.fullName) || 'Student';
const filename = 'Study Load - ' + name + '.pdf'; const filename = 'Study Load - ' + name + '.pdf';
await browser.downloads.download({ url, filename, saveAs: true }); try {
setTimeout(() => URL.revokeObjectURL(url), 10000); const id = await browser.downloads.download({ url, filename, saveAs: true });
const onChanged = (delta) => {
if (delta.id === id && delta.state && (delta.state.current === 'complete' || delta.state.current === 'interrupted')) {
browser.downloads.onChanged.removeListener(onChanged);
URL.revokeObjectURL(url);
}
};
browser.downloads.onChanged.addListener(onChanged);
} catch (err) {
URL.revokeObjectURL(url);
throw err;
}
} }