Wordspotting is a Chrome extension that scans pages for user-defined keywords and alerts you when matches appear. It is designed for configurable monitoring of specific sites, with local-first settings and optional in-page highlighting.
- Scan page content for custom keywords (plain text or regex patterns).
- Restrict scanning to an allowlist of sites you control.
- Show match counts on the extension badge.
- Fire notifications when matches appear (rising-edge behavior to reduce noise).
- Highlight matched text on-page (Chrome 105+ CSS Highlights support).
- Support dynamic pages and SPAs via observer-driven re-scan.
- Keep settings in browser sync storage for profile-level persistence.
- Theme support (
system,light,dark).
- Initializes default settings on install.
- Opens options on first install.
- Watches tab updates and injects scanner code only on allowed URLs.
- Receives scan results, updates badge text/color, and triggers notifications.
- Reacts to storage changes and refreshes allowlist behavior.
- Runs on allowed tabs only.
- Extracts page text, scans for keyword matches, and reports counts.
- Re-scans for SPA/dynamic DOM updates.
- Applies/removes highlight ranges when highlighting is enabled.
- Runs scan orchestration in an extension-owned offscreen document.
- Registers a deterministic readiness handshake with background (
ready+ready_check) before scan requests are forwarded. - Owns scan worker lifecycle and returns scan results to background.
- Offloads matching work from the main thread.
- Helps keep scanning responsive on larger pages.
entrypoints/popup/: current-tab status, quick add of the current site, shortcut to options.entrypoints/options/: manage keyword list, allowlist, toggles, highlight color, and theme.
- The extension only scans pages that match at least one allowlist pattern.
- Patterns can be regex-like entries or wildcard-style entries (
*supported). - Common examples:
*example.com**news.ycombinator.com*https://docs.example.com/path
- Badge shows:
-for inactive/not-allowed tabs.0when allowed but no matches.- Positive count when matches are found.
- Notifications trigger only when a tab transitions from no match to match, not repeatedly on every scan.
- No external server dependency for scanning or settings.
- Settings and lists are stored in
browser.storage.sync. - Scanning runs in the browser extension context.
- Node.js 20+
- pnpm 10+
pnpm installpnpm devpnpm buildpnpm quality # TypeScript compile + Biome lint
pnpm test # Vitest with coverage
pnpm smoke # repository smoke checks
pnpm smoke:e2e # Playwright-based extension smoke flow
pnpm package # build zip artifact via WXT- Run
pnpm dev(orpnpm build). - Open
chrome://extensions. - Enable Developer mode.
- Click Load unpacked.
- Select:
- Dev output:
.output/chrome-mv3-dev/ - Build output:
.output/chrome-mv3/
- Dev output:
- CI runs quality checks, smoke checks, unit tests, and uploads coverage to Codecov.
- On
main, CI also packages and uploads a zip artifact. - Tagged releases run a release workflow that validates tag/version consistency and uploads the release asset.
notifications: show browser notifications for new match events.storage: persist settings and lists.scripting: inject content script/CSS at runtime.offscreen: host scan execution in an extension-owned offscreen document.host_permissions: <all_urls>: required for runtime injection across user-allowlisted sites.
entrypoints/background.ts: lifecycle, injection, badge, notifications.entrypoints/injected.ts: page scanning and highlighting.entrypoints/offscreen/: offscreen scan host and readiness handshake.entrypoints/scan-worker.ts: worker-based scanning.entrypoints/popup/: popup UI.entrypoints/options/: options UI.entrypoints/shared/: shared settings, storage, scanner utilities.tests/: unit and e2e tests.docs/: architecture, storage model, and Chrome Web Store support docs.
- Badge stuck at
-: verify the extension is enabled and the current site matches your allowlist. - Badge always
0: verify keywords are configured and valid. - No notifications: check
wordspotting_notifications_onsetting. - Highlights not visible: ensure highlighting is enabled and the page/browser supports CSS Highlights.
- Dynamic pages not updating: refresh once, then confirm site is allowlisted and extension is enabled.
MIT.