uworld-customizer

UWorld Customizer

Source workspace for building the UWorld Customizer Chrome extension and Firefox add-on from one shared codebase.

Folder Layout

src/
  assets/      Shared icons
  content/     Shared content scripts
  popup/       Shared popup UI
platforms/
  chrome/      Chrome manifest
  firefox/     Firefox manifest
scripts/       Dependency-free build and packaging scripts
dist/          Generated builds and ZIP files

The published extension name stays UWorld Customizer in each browser manifest. The repository folder uses uworld-customizer so it works cleanly with GitHub URLs and command-line tooling.

Commands

With plain Node:

node scripts/build.js all
node scripts/build.js chrome
node scripts/build.js firefox
node scripts/zip.js
./scripts/package.sh

If npm is available:

npm run dev             # generate a standalone popup preview for the browser
npm run build
npm run build:chrome
npm run build:firefox
npm run zip
npm run package         # build + zip both browsers
npm run package:chrome  # build + zip Chrome only (for Web Store upload)

Previewing the popup UI

npm run dev writes a single self-contained file:

dist-dev/popup.html

Open it directly in any browser (double-click — no server needed). The extension storage API is mocked with localStorage, so toggles persist across reloads. The dev toolbar at the bottom lets you switch between Auto/Light/Dark themes and reset settings. dist-dev/ is not part of any published build.

These scripts use only Node’s built-in modules. No npm dependencies or node_modules folder are required.

npm run zip uses the system zip command and writes:

dist/uworld-customizer-chrome.zip
dist/uworld-customizer-firefox.zip

Development Flow

  1. Edit shared extension code in src/.
  2. Run npm run dev and check the popup in a browser via dist-dev/popup.html.
  3. Edit browser-specific metadata in platforms/chrome/manifest.json or platforms/firefox/manifest.json.
  4. For an update, bump version in both manifests (Chrome rejects re-uploads without a higher version).
  5. Run npm run package (or npm run package:chrome).
  6. Submit the generated ZIP. For the Chrome Web Store, use the copy/paste answers in CHROME_STORE_SUBMISSION.md for the privacy and permission disclosures.