How holynova/flysheep-game-rating works
FlySheep Game Rating is a Chromium extension that adds Steam and Xiaoheihe ratings to Flysheep game pages and offers a standalone lookup popup. Its page workflow extracts Chinese and English title candidates, requests ratings through the background service worker, and renders linked, rarity-colored tags. The service worker coordinates lookups, applies grade thresholds, and caches results; the popup uses the same lookup route and can inspect or clear that cache. README documentation establishes the major features; unsampled manifest wiring and some UI details are not independently verified here.
Main entry points: background.js Lookup messaging · content.js Title extraction · ratings.js Rating matching · popup.js Popup interactions
Components 16
Page Integration
- Title extraction
src/content.js - Page rating tags
src/content.js - Rating styles
src/tags.css
Rating Lookup
- Rating matching
src/ratings.js
Background Services
- Lookup messaging
src/background.js - Request queue
src/background.js - Grade calculation
src/background.js - Cache management
src/background.js
Popup Interface
- Popup interface
src/popup.html - Popup interactions
src/popup.js - Popup styles
src/popup.css
Other components
- Extension user
- Flysheep pages
- Steam services
- Xiaoheihe API
- Browser local storage
Connections 19
- Flysheep pages → Title extraction: hosts script
README.md - Title extraction → Rating matching: extracts candidates
src/content.js - Title extraction → Lookup messaging: sends lookup
src/content.js - Lookup messaging → Request queue: queues lookup
src/background.js - Request queue → Rating matching: runs lookup
src/background.js - Rating matching → Steam services: searches and fetches reviews
src/ratings.js - Rating matching → Xiaoheihe API: searches games
src/ratings.js - Lookup messaging → Grade calculation: grades results
src/background.js - Lookup messaging → Cache management: checks and stores
src/background.js - Cache management → Browser local storage: reads and writes
src/background.js - Lookup messaging → Title extraction: returns results
src/content.js - Title extraction → Page rating tags: renders ratings
src/content.js - Page rating tags → Rating styles: uses styles
README.md - Extension user → Popup interface: opens popup
README.md - Popup interface → Popup interactions: provides interface
README.md - Popup interactions → Lookup messaging: sends lookup
src/popup.js - Popup interactions → Browser local storage: reads and clears cache
src/popup.js - Lookup messaging → Popup interactions: returns results
src/popup.js - Popup interface → Popup styles: uses styles
README.md