56 Commits
Author SHA1 Message Date
adrianbonpin dfa63f5157 ci: use Gitea API for releases (softprops/action-gh-release targets GitHub, fails on Gitea with 405)
build-extension / build (push) Successful in 37s
build-extension / build (pull_request) Successful in 35s
2026-08-19 03:17:42 +08:00
adrianbonpin 7c578d2d16 ci: install PyMuPDF in a venv (PEP 668 externally-managed env blocks system pip)
build-extension / build (push) Failing after 35s
build-extension / build (pull_request) Successful in 32s
2026-08-19 03:10:47 +08:00
adrianbonpin 41e7a4b81e ci: install PyMuPDF in runner; skip PDF text assertions when fitz is unavailable
build-extension / build (push) Failing after 20s
2026-08-19 03:08:46 +08:00
adrianbonpin 92a7408100 docs: move Install section to top of README
build-extension / build (push) Failing after 18s
2026-08-19 03:06:57 +08:00
adrianbonpin c1567aca00 docs: add self-hosted Firefox install route (about:config) while AMO is under maintenance
build-extension / build (push) Failing after 16s
2026-08-19 03:04:34 +08:00
adrianbonpin 40fa9cc9b5 fix(chrome): replace URL.createObjectURL with base64 data URL for downloads (Chrome MV3 service worker has no createObjectURL)
build-extension / build (push) Failing after 15s
2026-08-19 02:57:20 +08:00
adrianbonpin cd418f513d docs: add README with install instructions for both browsers
build-extension / build (push) Failing after 2m49s
2026-08-19 02:48:40 +08:00
adrianbonpin f68aa305fa docs: add AGENTS.md agent guide 2026-08-19 02:48:31 +08:00
adrianbonpin 9edaa687a5 feat: add cross-browser browser.*/chrome.* shim; exclude test/ from builds 2026-08-19 02:48:15 +08:00
adrianbonpin b571953f10 ci: add Gitea Actions build + tag release pipeline 2026-08-19 02:46:32 +08:00
adrianbonpin 71ef7fa36f feat: add zero-dependency build script (firefox+chrome zips, version flag) 2026-08-19 02:46:15 +08:00
adrianbonpin 73c68cc1e8 chore: ignore docs/ and dist/, untrack spec/plan 2026-08-19 02:45:42 +08:00
adrianbonpin e11a7aad83 fix: leave Date Enrolled line empty (reserve space), nudge Printed by closer to bottom border 2026-08-19 02:15:16 +08:00
adrianbonpin cb47d6faac fix: teacher name format, non-bold total, total row spacing, year-level show/custom/smart settings 2026-08-19 02:12:06 +08:00
adrianbonpin 106900860a feat: add option to truncate long course descriptions to single line (default on, matches official PDF) 2026-08-19 02:02:50 +08:00
adrianbonpin b3b4495427 feat: embed bundled Segoe UI fonts (with fontkit) for 1:1 typography match with reference PDF 2026-08-19 01:49:14 +08:00
adrianbonpin 79d58f994d fix: Year Level nudge reduced to 6pt (half) 2026-08-19 01:28:48 +08:00
adrianbonpin 161f540e40 fix: non-bold table headers, nudge Year Level left, center units + total to match reference 2026-08-19 01:25:50 +08:00
adrianbonpin 79702cb847 fix: embed logo as transparent PNG (SMask) to remove green badge background, matching official PDF 2026-08-19 01:16:30 +08:00
adrianbonpin 2fa4064c7c feat: format download filename as ID - Program - S.Y. YYYY-YYYY - Semester - Study Load 2026-08-19 00:57:27 +08:00
adrianbonpin 4ef392423a fix: raise total underline above the number 2026-08-19 00:54:27 +08:00
adrianbonpin e6249ae330 fix: draw total underline above the total 2026-08-19 00:52:32 +08:00
adrianbonpin 51d467fbe7 fix: center NOTE header, draw total underline below total 2026-08-19 00:48:13 +08:00
adrianbonpin 52360ab559 fix: split multi-segment schedules and expand row height to prevent text overlap 2026-08-19 00:44:17 +08:00
adrianbonpin c75850da2e fix: remove header vertical dividers, fix header label positions, correct total underline 2026-08-19 00:29:51 +08:00
adrianbonpin 17aeab9592 feat: 1:1 reference styling for Study Load PDF (header box, spacing, columns, schedule format, name format) 2026-08-18 23:57:31 +08:00
adrianbonpin 053c6aaa98 feat: pull semester/year from the study load search dropdowns 2026-08-18 22:19:55 +08:00
adrianbonpin 57c4b6f204 fix: match reference layout geometry (margins, student row zones, column spread, spacing) 2026-08-18 19:56:06 +08:00
adrianbonpin 792974bd32 feat: add header logo, fix teacher field, compact program, date range, total under UNITS 2026-08-18 19:47:59 +08:00
adrianbonpin 631ff4e9d2 fix: render new Study Load layout (GROUP-first, student row, stacked schedule) in PDF 2026-08-18 19:41:00 +08:00
adrianbonpin 1537881ebc feat: restore direct PDF download via background; drop printdoc 2026-08-18 19:38:26 +08:00
adrianbonpin 8bcfee341c style: place Download PDF button inline with total units, left-aligned 2026-08-18 19:34:31 +08:00
adrianbonpin b09e0cea76 fix: open printable Study Load via blob URL to avoid cross-origin document error 2026-08-18 19:32:24 +08:00
adrianbonpin bf4e7170a6 style: add top and bottom margin to Download PDF button 2026-08-18 19:31:27 +08:00
adrianbonpin cb2beecc0e feat: on-page Download PDF opens Letter-size printable Study Load; drop pdf-lib/background path 2026-08-18 19:28:44 +08:00
adrianbonpin d6bacef1ec feat: filter DISSOLVED courses and sum units 2026-08-18 19:24:00 +08:00
adrianbonpin 9f02bebdea feat: use USC ISMIS logo on portal blue icon 2026-08-18 19:14:15 +08:00
adrianbonpin 0128476c37 fix: match actual login field name (Username) 2026-08-18 19:11:08 +08:00
adrianbonpin f7e72ddff3 fix: use background.scripts for Firefox MV3 compatibility 2026-08-18 19:09:02 +08:00
adrianbonpin 2cf3b71e27 chore: ignore node_modules 2026-08-18 17:14:59 +08:00
adrianbonpin 8020a24655 fix: single active profile and accurate download message 2026-08-18 17:13:51 +08:00
adrianbonpin 78570c4088 feat: popup UI for profiles and study load 2026-08-18 17:09:54 +08:00
adrianbonpin 4d7ff1a0e7 fix: revoke object URL on download completion 2026-08-18 15:55:48 +08:00
adrianbonpin a072edd6d1 feat: background message routing and PDF download 2026-08-18 15:51:30 +08:00
adrianbonpin d12a7da646 fix: check response status in content script fetches 2026-08-18 15:50:19 +08:00
adrianbonpin c4f379ff1c feat: content script for auto-login, privacy, scraping 2026-08-18 15:47:15 +08:00
adrianbonpin 0d29f0116a fix: widen NOTE column and add pagination to study load PDF 2026-08-18 15:44:12 +08:00
adrianbonpin cefad72416 feat: build study load PDF 2026-08-18 15:38:37 +08:00
adrianbonpin 544d4aab1a fix: robust group-suffix stripping in parseOfferedCourses 2026-08-18 15:35:08 +08:00
adrianbonpin 5a9c185a48 feat: parse offered courses descriptions 2026-08-18 15:33:07 +08:00
adrianbonpin 94d9b7a879 fix: harden parseProfilePage class and program extraction 2026-08-18 15:30:49 +08:00
adrianbonpin 3c409ea048 feat: parse profile page header 2026-08-18 15:28:12 +08:00
adrianbonpin 06d9a4be11 docs: note node --test fix in plan 2026-08-18 15:26:43 +08:00
adrianbonpin b920bf6f61 fix: use node --test for Node 26 compatibility 2026-08-18 15:26:37 +08:00
adrianbonpin a57d7ac44c feat: parse study load table 2026-08-18 15:26:13 +08:00
adrianbonpin a0178aa0ab chore: scaffold ISMIS Helper extension 2026-08-18 15:23:54 +08:00
2 changed files with 9 additions and 17 deletions
+8 -16
View File
@@ -10,19 +10,11 @@ function errMsg(err) {
return String((err && err.message) || err); return String((err && err.message) || err);
} }
// Build a download URL from PDF bytes. Firefox's background is a real page // Build a download URL from PDF bytes. Chrome MV3 runs the background as a
// (URL.createObjectURL available) and supports blob: URLs in downloads. // service worker, where URL.createObjectURL is NOT available, so we use a
// Chrome MV3 runs the background as a service worker where URL.createObjectURL // base64 data URL (works in both Firefox and Chrome). PDFs here are small
// is NOT available, but its downloads API accepts base64 data: URLs. // (~150KB), well within data-URL length limits.
// Firefox rejects data: URLs in browser.downloads.download with function pdfDataUrl(bytes) {
// "Access denied for URL data:...", so pick per-browser.
function buildDownloadUrl(bytes) {
if (typeof URL !== 'undefined' && typeof URL.createObjectURL === 'function') {
const blob = new Blob([bytes], { type: 'application/pdf' });
return URL.createObjectURL(blob);
}
// Fallback: Chrome MV3 service worker. PDFs here are small (~150KB), well
// within data-URL length limits.
let binary = ''; let binary = '';
const chunk = 0x8000; const chunk = 0x8000;
for (let i = 0; i < bytes.length; i += chunk) { for (let i = 0; i < bytes.length; i += chunk) {
@@ -53,9 +45,9 @@ function formatPeriod(period) {
async function generatePdf(data) { async function generatePdf(data) {
const bytes = await ISMIStools.buildStudyLoadPdf(data); const bytes = await ISMIStools.buildStudyLoadPdf(data);
// Firefox accepts blob: object URLs; Chrome MV3 service worker has no // Chrome MV3 background is a service worker (no URL.createObjectURL), so we
// URL.createObjectURL, so it falls back to a base64 data: URL there. // use a base64 data URL that works in both browsers.
const url = buildDownloadUrl(bytes); const url = pdfDataUrl(bytes);
const header = data.header || {}; const header = data.header || {};
const year = parseInt(data.year, 10); const year = parseInt(data.year, 10);
const period = formatPeriod(data.period || header.semester || ''); const period = formatPeriod(data.period || header.semester || '');
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "ISMIS Helper", "name": "ISMIS Helper",
"version": "1.3.0", "version": "1.2.0",
"description": "Auto-login, auto-accept privacy policy, and Study Load PDF for the USC ISMIS portal.", "description": "Auto-login, auto-accept privacy policy, and Study Load PDF for the USC ISMIS portal.",
"permissions": ["storage", "downloads"], "permissions": ["storage", "downloads"],
"host_permissions": ["https://ismis.usc.edu.ph/*"], "host_permissions": ["https://ismis.usc.edu.ph/*"],