Chrome Extension Dev
The extension lives in extension/ and is intentionally minimal — it’s a thin launcher, not a scanner.
Architecture
extension/
├── manifest.json # Manifest V3, activeTab permission only
├── popup.html # Popup UI (current URL + Scan button)
├── popup.js # Opens /dashboard?autoScan=<url> in a new tab
└── icons/ # 16/48/128px PNG + SVGThe extension does not run any scan logic. Clicking Scan this page:
- Reads the current tab URL using
chrome.tabs.query - Opens
http://localhost:3000/dashboard?autoScan=<url>in a new tab - The main app detects the
autoScanquery param and starts a scan automatically
Changing the app URL
The target URL is hardcoded in popup.js. To point the extension at a deployed instance:
// popup.js
const APP_URL = 'https://your-clearsight-instance.com' // change thisPermissions
The extension only requests activeTab. It cannot:
- Access tabs the user isn’t actively viewing
- Access browser history
- Run in the background
Loading in developer mode
- Open
chrome://extensions - Enable Developer mode
- Click Load unpacked → select the
extension/directory - The ClearSight icon appears in the toolbar
Changes to popup.html and popup.js take effect after reloading the extension (click the refresh icon in chrome://extensions).
Building for distribution
The extension is Manifest V3 with no build step. To package for release:
cd extension
zip -r clearsight-extension.zip . -x "*.DS_Store"Next steps
Last updated on