This repo now has a single TypeScript WebExtension codebase that builds for both browsers:
dist/chromefor Chrome/Chromium (MV3 service worker)dist/firefoxfor Firefox (MV3 background scripts fallback)
- TypeScript: strict typing for brittle PeopleSoft form/state fields.
- Esbuild: fast local iteration and simple multi-target output.
- Manifest generation per target: one shared base manifest + browser-specific background config.
- Content-script-first CAESAR client: requests run in page context with user session cookies.
This is the best pragmatic setup here because CAESAR is stateful (ICSID, ICStateNum, ICAction) and same-origin requests from an active authenticated tab are the least fragile pattern.
src/content/framework/*: reusable augmentation template + runnersrc/content/augmentations/*: independent page enhancements (plugin-style)src/content/peoplesoft/*: PeopleSoft request + parse logicsrc/popup/*: UI for class number lookupsrc/shared/*: typed message contractssrc/manifest.base.json: shared manifest fieldsscripts/build.mjs: emits browser-specific bundles/manifests
Each enhancement follows a template pattern:
- identify applicable pages
- collect target DOM nodes
- fetch any required data
- render the UI change
Register plugins in src/content/augmentations/registry.ts so you can add many independent improvements without coupling them together.
Boundary rule:
src/content/peoplesoft/*should stay generic (request orchestration + generic search/detail payloads).- Feature-specific extraction/parsing (like seats + notes) belongs inside that feature folder under
src/content/augmentations/*.
npm install
npm run typecheck
npm run buildTarget-specific builds:
npm run build:chrome
npm run build:firefoxWatch mode (Chrome target):
npm run devChrome:
- Open
chrome://extensions - Enable Developer Mode
- Load unpacked ->
dist/chrome
Firefox:
- Open
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Choose
dist/firefox/manifest.json
- Enrollment navigation helper:
- Intercepts Shopping Cart / Enroll clicks and acquires a PeopleSoft traffic lock (aborts in-flight seat/notes lookups, then waits for idle before navigating).
- Applies an early term-page visual mask + spinner so the intermediate selector page is not shown during auto-continue.
- Adds a Tyrian term-switch dropdown across enrollment workflow pages (
Shopping Cart,Drop,Update,Swap); selecting a term routes through term selector with the chosen term pre-selected.
- Content script auto-detects shopping cart rows (
P_CLASS_NAME$N) and injects a metadata card next to each class. - For each class number, it performs a CAESAR class search request and displays parsed metadata inline.
- Responses are cached by class number to avoid duplicate requests in the same page session.
- Popup sends a class number to the content script on the active CAESAR tab.
- Content script serializes current
win0form state. - It posts a class-search action with your class number.
- It returns parsed summary values (criteria class number, first result class number/title/section, details action id).
- Treat session cookies/tokens as sensitive credentials.
- If CAESAR changes field suffixes (like
$8), this code tries prefix-based discovery first and falls back to known defaults.