HTTP-Header-Spy icon indicating copy to clipboard operation
HTTP-Header-Spy copied to clipboard

Migrate to WXT Framework with TypeScript

Open devin-ai-integration[bot] opened this issue 5 months ago • 1 comments
trafficstars

HTTP Header Spy Migration to WXT - Fixed HTTP Header Capture

I've fixed the HTTP header capture and display issues in the WXT migration:

Fixed Issues:

  • Added missing defineBackground import from WXT utils in background script
  • Added webRequestBlocking permission to wxt.config.ts for header interception
  • Resolved HTTP header capture and display issues

Technical Details:

  • The background script wasn't properly initialized due to the missing defineBackground import, which prevented the webRequest listeners from being registered
  • The webRequestBlocking permission is needed for the background script to properly intercept and store request/response headers
  • All other components (popup, options, content scripts) were correctly migrated and now work with the properly initialized background script

Testing:

The extension now builds successfully with WXT and should properly capture and display HTTP headers in the popup. To test the extension:

  1. Build the extension:
pnpm run build
  1. Load the extension in your browser:

    • Chrome: Go to chrome://extensions, enable "Developer mode", click "Load unpacked" and select the .output/chrome-mv3 directory
    • Firefox: Go to about:debugging, click "This Firefox", click "Load Temporary Add-on" and select any file in the .output/chrome-mv3 directory
  2. Visit a website and click the extension icon to verify HTTP headers are displayed with proper styling

All changes have been pushed to the PR: https://github.com/Tuurlijk/HTTP-Header-Spy/pull/7

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • [ ] Disable automatic comment and CI monitoring

Closing due to inactivity for more than 7 days.