Skip to content

investblog/xpather

Repository files navigation

Xpather

Find, generate and test XPath expressions. Browser extension with smart variants, element picker, and zero telemetry.

Chrome Web Store License

Features

  • Element picker — hold Alt + hover to highlight, Alt + click to capture. Works without blocking page interactions
  • 7 generation strategies — by ID, data-* attributes, aria/name/role, text content, class, shortest unique path, absolute path
  • Smart ranking — best variant marked automatically, duplicates removed, max 8 variants capped at 2 per strategy
  • Live evaluation — type any XPath, see match count and highlighted results in real time
  • Side panel mode — pin to side panel for continuous workflow without popup closing
  • Result preview — first match summary with node description, expandable result tree
  • Dark & light theme — follows system preference or toggle manually
  • Fully local — no accounts, no analytics, no network requests, no data leaves your browser

How it works

Click the toolbar icon or use the keyboard shortcut — Xpather opens as a popup or side panel. Type an XPath expression to evaluate it against the current page, or use the element picker to generate variants automatically.

The picker activates with Alt + hover to highlight elements and Alt + click to select. Generated XPath variants are ranked by specificity — unique matches are marked as best. Click any variant to copy and evaluate.

Everything runs locally. No data is stored, transmitted, or logged.

Development

git clone https://github.com/investblog/xpather.git
cd xpather
npm install

npm run dev            # Chrome MV3 dev server with HMR
npm run dev:firefox    # Firefox MV2 dev server
npm run build          # Chrome production build
npm run build:firefox  # Firefox production build
npm run zip:all        # Build all platforms
npm run check          # Typecheck + lint + test

Tech stack

  • WXT — web extension framework with HMR
  • TypeScript strict mode
  • Vanilla DOM + CSS custom properties (no framework)
  • Chrome MV3 + Firefox MV2 + Edge MV3 builds
  • Zero runtime dependencies

Privacy

Xpather makes zero network requests. No analytics, no telemetry, no remote code. XPath evaluation happens in the page context via content script and results are never persisted. The only local data is your theme preference.

Full privacy policy: PRIVACY.md

License

Apache 2.0


Built by investblog at 301.st with Claude

Releasing / store deploy

Version lives only in wxt.config.ts (manifest.version); package.json is not used by the build. To release: bump it, then git tag vX.Y.Z && git push origin vX.Y.Z.

A v* tag drives two workflows:

  • release.yml — typecheck/lint/test + a GitHub release with the built ZIPs.
  • submit.yml — a thin caller of the shared reusable workflow investblog/geo-tier-builder/.github/workflows/store-submit.yml@main.

Chrome + Edge auto-submit on the tag; Firefox is manual (Actions → Submit to storesstores=firefox; AMO burns version numbers forever, so it never auto-runs). The manual dispatch has a dry_run toggle that validates credentials without publishing.

Store credentials are this repo's GitHub Actions secrets (CHROME_*, FIREFOX_*, EDGE_*). API creds are account-level and shared across all investblog extensions; only the per-extension IDs (CHROME_EXTENSION_ID, FIREFOX_EXTENSION_ID, EDGE_PRODUCT_ID) differ.

Before changing the release/CI flow: confirm the reusable-workflow ref still resolves and the secrets exist (gh secret list). Store publishing here depends on the external investblog/geo-tier-builder workflow — it is a cross-repo contract, not visible from this repo's code alone.

About

Find, generate and test XPath expressions. Browser extension with smart variants, element picker, and zero telemetry.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors