How zombie/blind-reviews works
Project type and purpose
• This is a cross-browser extension (“Blind Code Reviews”) whose goal is to redact or hide author names on code-review pages (GitHub and Bugzilla).
File structure
Top-level artifacts:
• manifest.json – WebExtension manifest that wires everything together
• package.json, .travis.yml – build/test configuration
• github/ & bugzilla/ – site-specific content scripts and CSS
• debug.html, debug.js – local debugging harness for the extension
• test/ – automated tests (e.g., test/github-public.js)
Patterns and choices:
• Modular content scripts per host site (GitHub vs. Bugzilla)
• Shared JS (“common.js”) and per-site styles (“blind.css”)
• Debug harness running the same JS in an isolated page
• Standard WebExtension architecture (manifest → content/background scripts → resources)
README for additional insights
• Confirms it’s a browser extension to redact review authors
• Build steps: npm install, npm test
a. Main components:
1. Browser (host environment)
2. WebExtension Manifest
3. Content Scripts – GitHub module & Bugzilla module
4. Shared Libraries – common.js, request.js, reviewboard.js, show_bug.js, splinter.js
5. CSS Assets – blind.css per site
7. Background or Debug Harness – debug.html & debug.js (local dev)
8. Test Runner – Node.js + test/github-public.js
9. CI Pipeline – .travis.yml
b. Relationships and interactions:
• The browser loads manifest.json → registers content scripts for matching URLs
• On page load (GitHub or Bugzilla), the corresponding content script is injected
• Content script loads its blind.css and common.js modules, then calls site-specific JS to redact author names
• debug.html loads the same JS/CSS modules in a standalone context for interactive debugging
• Tests invoke the JS modules headlessly (Node + JSDOM or similar) to validate redaction logic
• CI (.travis.yml) runs npm test on every commit
c. Architectural patterns and design principles:
• Modular content scripts: one directory per target site
• Shared code extracted into common.js
• Separation of concerns: CSS for styling/redaction, JS for DOM manipulation and logic
• Standard WebExtension API usage (manifest → content/background → messaging if needed)
• Test-first approach with automated CI
d. Key technologies/frameworks:
• WebExtension Manifest v2/v3 API
• Vanilla JavaScript (ES modules, common.js)
• CSS for runtime redaction
• Node.js + Mocha or Jest for tests
• Travis CI for continuous integration