npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bug-report-js

v2.3.1

Published

A drop-in JavaScript widget to generate comprehensive bug reports with DOM capture, interactions, console logs, and JS errors.

Downloads

265

Readme

Bug Report Capture — Chrome Extension

A Chrome extension for structured bug reporting. Captures user interactions, console logs, JavaScript errors, and network request metadata, then exports them as a sanitized, downloadable HTML report.

Looking for the website widget / NPM package? See website/README.md.


Installation

  1. Open Chrome → chrome://extensions
  2. Enable Developer mode (toggle top-right)
  3. Click Load unpacked and select this folder
  4. The 🐛 icon appears in the toolbar — pin it via the puzzle-piece menu if needed

Usage

  1. Navigate to any page
  2. Interact normally (clicks, scrolls, forms, etc.)
  3. Click the 🐛 toolbar icon
  4. Review the capture summary
  5. Click Download Report — a bug_report_<timestamp>.json file is saved

Testing

Interaction Capture

Perform clicks, form changes, keyboard events, and scrolls, then generate a report. In the interactions array:

  • Each entry has timestamp, eventType, url, selector, tagName
  • Click events include viewportCoordinates
  • Keyboard events show only the key name ("Enter") — no typed characters
  • No form field values appear

Console Log Capture

console.log("Test log message")
console.warn("Test warning")
console.error("Test error")

Check the consoleLogs array for entries with timestamp, level, and message. Max 100 entries.

JS Error Capture

undefinedFunction()                          // runtime error
Promise.reject(new Error("test rejection"))  // unhandled rejection

Check jsErrors for entries with timestamp, message, errorType. Max 50 entries.

Network Request Capture

fetch('https://httpbin.org/get')
fetch('https://httpbin.org/status/500')

Check networkRequests for timestamp, method, url, statusCode, duration. Max 200 entries. No cookies, auth headers, or bodies are included.

Privacy & Sanitization

console.log("Contact: [email protected]")
console.log("Token: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ0ZXN0IjoxfQ.abc123")
console.log("API key: apikey=sk-12345678abcdef")

Verify in the report:

  • Emails → [REDACTED_EMAIL]
  • Bearer tokens → [REDACTED_TOKEN]
  • API keys → [REDACTED_API_KEY]

For URL params, navigate to https://example.com/search?q=test&page=1&token=secret123 and confirm:

  • q, page → kept (safe allowlist)
  • token → removed (sensitive blocklist)

Report Structure

{
  "schemaVersion": "1.0.0",
  "reportTimestamp": "...",
  "extensionVersion": "1.0.0",
  "pageMetadata": {
    "url": "...",
    "userAgent": "...",
    "viewportSize": { "width": 0, "height": 0 },
    "screenResolution": { "width": 0, "height": 0 },
    "scrollPosition": { "x": 0, "y": 0 },
    "zoomLevel": 1,
    "browserName": "...",
    "browserVersion": "..."
  },
  "interactions": [],
  "consoleLogs": [],
  "jsErrors": [],
  "networkRequests": [],
  "sanitizationSummary": {
    "totalRedactions": 0,
    "redactionsByType": {}
  },
  "captureLimitations": []
}

File Structure

Bug-download-button/
├── website/
│   ├── bug-report.js    # Website widget / NPM package
│   ├── README.md        # Widget documentation
│   ├── index.html       # Demo page
│   └── docs.html
├── manifest.json        # Extension manifest (Manifest V3)
├── background.js        # Service worker: network capture, report assembly
├── content.js           # Content script: interactions, console, errors
├── sanitizer.js         # Sanitization module
├── popup.html
├── popup.css
├── popup.js
└── icons/
    ├── icon16.png
    ├── icon48.png
    └── icon128.png

Known Limitations

  • Data captured only while the extension is active on the current tab
  • Pre-existing console logs, errors, and network requests (before extension load) are not captured
  • Browser-internal pages (chrome://, about:) are not supported
  • Cross-origin iframes may not be fully captured
  • Network capture uses the webRequest API — metadata only, no request/response bodies