How wwwoper/gh-switcher works
gh-switcher is a small browser extension that adds local links from GitHub repository pages to GitIngest and GitDiagram, and changes the toolbar icon according to the active tab’s host. The primary workflow is repository page → injected buttons → external service. A separate background workflow handles tab events and icon updates. The README documents the manifest and button styling; their precise wiring is not shown in the sampled source, so those connections are marked unverified.
Main entry points: content.js Repository buttons · manifest.json Extension manifest · background.js Tab icon updater · content.css Button styles
Components 8
Repository page UI
- Repository buttons
extension/content.js - Button styles
extension/content.css - Extension manifest
extension/manifest.json
Tab icon behavior
- Tab icon updater
extension/background.js - Color and gray icons
extension/icons
External tools
- GitIngest
- GitDiagram
Other components
- GitHub repository page
Connections 7
- GitHub repository page → Repository buttons: renders on
README.md - Repository buttons → GitIngest: links to
extension/content.js - Repository buttons → GitDiagram: links to
extension/content.js - Repository buttons → Button styles: styled by
README.md - Extension manifest → Repository buttons: configures
- Extension manifest → Tab icon updater: configures
- Tab icon updater → Color and gray icons: selects
extension/background.js