Skip to content

appaKappaK/better-trading-for-firefox

Repository files navigation

Better Trading for Firefox

GitHub Actions CI License Firefox Add-on

A Firefox-only Manifest V3 extension that enhances the Path of Exile trade site with bookmarks, search history, live trade enhancers, and seamless migration from the original Better Trading add-on.

  • Bookmark trade searches into named folders, mark trades complete, and update saved locations as leagues change
  • Track search history automatically as you browse trade pages
  • Apply live enhancers on trade result pages: equivalent chaos/divine pricing, stat filter highlighting, socket warnings, and grouped duplicate listings
  • Import from the original add-on – paste a folder export string or a full backup file to carry over all your data

The in-page panel handles live trading, bookmarks, and history. The popup manages imports, settings, and exports.

Requirements

  • Node.js 22+
  • npm 10+
  • Firefox (any release channel)

If your system Node is older, use nvm: nvm install 22 && nvm use 22
(This will also give you the correct npm version automatically.)

If you already have Node 22+ but npm is older than 10, update it manually:

npm install -g npm@latest

If you already ran npm install under the wrong Node version you will see SyntaxError: Unexpected reserved word from the wxt prepare postinstall step. Switch to Node 22, delete node_modules, then reinstall:

nvm install 22 && nvm use 22
rm -rf node_modules
npm install

Install

Install from AMO, or load it manually:

npm install
npm run build
# Load .output/firefox-mv3/ as a temporary add-on in about:debugging

Developer Commands

Command What it does
npm run dev Hot-reload dev build targeting Firefox MV3
npm run build Production build
npm run zip Package a signed-ready .zip for AMO upload
npm run compile TypeScript type-check (no emit)
npm test Unit tests via Vitest
npm run lint:firefox web-ext lint, auto-builds if output is missing
npm run smoke:firefox End-to-end Selenium smoke test against a real Firefox binary

Smoke test

npm run smoke:firefox packages the extension, installs it into a headless Firefox with Selenium, navigates to a trade page, and verifies the panel mounts. It saves a screenshot to .output/smoke/firefox-smoke.png.

The script auto-detects Firefox on Windows, Linux/Fedora, and macOS. Override with:

FIREFOX_BINARY=/path/to/firefox npm run smoke:firefox

CI

The GitHub Actions pipeline runs on every push and pull request:

  1. npm run compile - TypeScript
  2. npm test - unit tests
  3. npm run build - production build
  4. npm run lint:firefox - web-ext lint (0 warnings required)
  5. npm run smoke:firefox - headless Firefox smoke test

A release workflow triggers on semver tags (v*.*.*), runs the same gates, then zips and attaches the artifact to a GitHub Release.

Legacy Migration

To import data from the original Better Trading add-on:

  1. Open the extension popup and go to the Import tab
  2. Paste a folder export string (3:eyJ...) or the full backup text from the original add-on
  3. Or click Backup file to load a .txt backup file directly
  4. Preview the folder and trade counts, then click Import legacy data

All v1, v2, and v3 export formats are supported. Your old extension data is never auto-deleted.

To export your current data: go to the Bookmarks tab in the popup and use Download backup or Copy full backup.

Background

This extension is a Firefox-native rebuild of Better Trading by exile-center.

The original add-on is Chrome-first. The author has been open about deprioritizing Firefox, citing the stricter review process and smaller user base. The last Firefox release was v1.3.2, which predates Manifest V3 and has become increasingly out of step with both Firefox and the trade site itself.

This rebuild starts from scratch with a Firefox-only MV3 architecture, using WXT and Preact instead of the original Ember-based stack. The bookmark export format is kept fully compatible with the original so existing data carries over without any loss.

Notes

  • Firefox is the only supported browser (no Chrome, no cross-browser shims). Use the original Better Trading extension for other browsers.
  • The build aliases react/react-dom to preact/compat to minimize bundle size.
  • The npm run lint:firefox command intentionally suppresses framework-generated innerHTML warnings that originate from bundled output only. This is a build-time suppression, not a runtime bypass. Any authored innerHTML in the source directories (src/ or entrypoints/) is not suppressed and will surface immediately in linting results for manual review.

About

Bookmark trade searches, track history, and apply live enhancers on the Path of Exile trade site. Firefox-only MV3 extension.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors