Extension architecture
Web Highlighter is a Manifest V3 extension built with WXT, React, and TypeScript. It has four parts:
- A content script runs on http and https pages. It handles selection, the floating color palette, keyboard shortcuts, and restoring saved highlights.
- A React popup has three tabs: This Page, Library, and All Highlights.
- A background service worker opens an onboarding page on first install only, not on updates.
- A React onboarding page welcomes new users.
The popup and content script talk through typed runtime messages: scroll to a highlight, delete a highlight, or clear a page. Both sides share one definition of that format, so neither can send a message the other doesn’t handle.


