This Chrome extension is built with TypeScript and Vite for modern development experience.
- Install dependencies:
npm installsrc/- TypeScript source filesbackground.ts- Service worker background scriptcontent-script.ts- Content script injected into web pagespopup.ts- Popup UI logicpopup.html- Popup UI templatemanifest.json- Extension manifesttypes/- TypeScript type definitions
Development build with watch mode:
npm run devProduction build:
npm run buildType checking:
npm run type-check- Build the extension:
npm run build - Open Chrome and go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
dist/folder
Build and package the extension:
npm run build
npm run packageThis creates plugin.zip ready for Chrome Web Store upload.
A test web application is provided in the test-app/ directory to help you test the extension locally.
Quick Test Setup:
- Build the extension:
npm run build-
Load the extension in Chrome:
- Go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
dist/folder
- Go to
-
Start the test server:
cd test-app
node server.js
# Opens at http://localhost:8000- Open
http://localhost:8000in Chrome and test the integration
The test app demonstrates both integration methods:
- Direct registration when extension is already loaded
- Race condition handling when page loads before extension
See test-app/README.md for detailed testing instructions.