feat: add option to truncate long course descriptions to single line (default on, matches official PDF)
This commit is contained in:
+2
-1
@@ -168,9 +168,10 @@
|
||||
const included = ISMIStools.filterStudyLoadCourses(courses);
|
||||
if (!included.length) throw new Error('No enrolled courses found.');
|
||||
const totalUnits = ISMIStools.sumUnits(included);
|
||||
const { truncateDescription } = await browser.storage.local.get('truncateDescription');
|
||||
const res = await browser.runtime.sendMessage({
|
||||
type: 'generate-pdf',
|
||||
data: { header, courses: included, totalUnits }
|
||||
data: { header, courses: included, totalUnits, truncateDescription: truncateDescription !== false }
|
||||
});
|
||||
if (!res || !res.ok) throw new Error((res && res.error) || 'PDF generation failed');
|
||||
showToast('PDF downloaded.');
|
||||
|
||||
Reference in New Issue
Block a user