FinalPrice

Sole Developer · Chrome Extension · Published on the Web Store

FinalPrice detects prices on any webpage and shows you the real cost, tax included, before you buy. It adds a small badge with the after-tax total next to every price it finds (or replaces the price outright), and it works on Amazon, Walmart, eBay, and most other shopping sites. I designed, built, tested, and published it solo.
Built with: JavaScript (Manifest V3), Vitest

How It's Built

Two-Phase Price Detection

The content script processes pages in two phases: a mark pass walks the DOM, finds price text with a locale-aware parser (US, EU, and space-grouped formats), and annotates it without touching visible text; a render pass then computes the tax-included values and draws the badges. Splitting the work this way means a settings change only re-renders instead of re-walking the whole page. A MutationObserver and shadow DOM scanning keep it working on single-page apps, lazy-loaded content, and embedded checkouts.
page load every site, all frames DOM mutations SPAs · lazy content shadow DOM embedded checkouts Phase 1 — Mark markPricesInNode() walk the DOM element-level skip filters parse price text US · EU · space-grouped formats wrap & annotate data-ptc-value · data-ptc-currency visible text never changes annotated spans & containers Phase 2 — Render renderAllPrices() resolve the tax rate site override → state + local → manual compute the total tax + optional currency conversion draw it append a pill badge — or replace the text $29.99 $32.84 w/ tax badge appended on the page settings changed in popup displayOnlyCleanup() re-render only — no re-walk

Knowing When Not to Add Tax

Finding prices was the easy part. The tricky part was knowing which ones to leave alone. The extension reads the text around each price to classify it: struck-through "was" prices, per-unit rates like $0.35/oz, and shipping thresholds like "orders over $35" are skipped, while phrases like "incl. VAT" (in English, German, French, and half a dozen other languages) flag prices that already include tax. It also parses each page's schema.org metadata for the declared currency and tax status, and defaults to tax-included on EU/UK/AU storefronts where the law requires inclusive pricing.
price found struck-through “was” price? del · s · line-through · price-was classes yes skip no per-unit rate? “$0.35 /oz” — but /mo & /yr are real prices yes skip no order minimum, not a price? “on orders over $35” thresholds yes skip no tax already included? “incl. VAT” · JSON-LD · EU/UK/AU sites yes skip ≈ badge if converting no tax-exempt category? state rules for groceries, clothing yes tax-free badge explicit 0% rate no pre-tax price → badge it $32.84 w/ tax next to $29.99 price text beats page metadata; metadata beats locale defaults

Features

FinalPrice auto-detects your US state tax rate by IP, or you can set a state manually and stack a local city/county rate on top. Per-site controls let you override the rate, blacklist, or whitelist individual domains, and prices can be converted to 30+ currencies using hourly-cached live exchange rates. It collects no data. All settings live in your browser, and the only network requests are the ones you opt into.