# ge-ku/ban-checker-for-steam architecture

> Architecture diagram of the GitHub repository ge-ku/ban-checker-for-steam, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ge-ku/ban-checker-for-steam
- Repository: https://github.com/ge-ku/ban-checker-for-steam

## Overview

Ban-Checker-for-Steam is a browser extension that augments Steam community pages with player-ban information and Counter-Strike match insights. On friends pages, it collects player IDs, requests ban data through the extension worker, and displays verdicts; older group/friends layouts use a separate direct-API script. Counter-Strike history pages add ban scanning and match statistics, while options store API-key and display preferences. The README also documents recently played and group-member scanning. Those paths are represented by the legacy community scanner; details of unsampled manifest wiring are not inferred.

Main entry points: [`checkbans.js`](https://github.com/ge-ku/ban-checker-for-steam/blob/master/checkbans.js) (Friends scanner), [`service_worker.js`](https://github.com/ge-ku/ban-checker-for-steam/blob/master/service_worker.js) (Extension worker), [`gcpd730.js`](https://github.com/ge-ku/ban-checker-for-steam/blob/master/gcpd730.js) (Match history scan), [`checkbans-old.js`](https://github.com/ge-ku/ban-checker-for-steam/blob/master/checkbans-old.js) (Legacy scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_community["Community Scanning"]
  node_friends_scanner["Friends scanner<br/>[checkbans.js]"]
  node_legacy_scanner["Legacy scanner<br/>[checkbans-old.js]"]
  node_verdict_ui["Ban verdicts<br/>[checkbans.js]"]
  node_url_compat["Group URL compatibility<br/>[replaceurl.js]"]
end

subgraph group_counterstrike["Counter-Strike"]
  node_match_history["Match history scan<br/>[gcpd730.js]"]
  node_cs_rating["CS rating display<br/>[csrating.js]"]
end

subgraph group_extension["Extension Services"]
  node_menu_shortcuts["Page shortcuts<br/>[service_worker.js]"]
  node_worker["Extension worker<br/>[service_worker.js]"]
end

subgraph group_settings["Settings"]
  node_sync_settings[("Sync settings")]
  node_options_ui["Options<br/>[options.js]"]
end

node_user(("Steam user"))
node_steam_pages["Steam pages"]
node_steam_api["Steam Web API"]

node_user -->|"opens"| node_steam_pages
node_steam_pages -->|"scans players"| node_friends_scanner
node_friends_scanner -->|"requests bans"| node_worker
node_worker -->|"fetches bans"| node_steam_api
node_worker -->|"returns data"| node_friends_scanner
node_friends_scanner -->|"renders verdicts"| node_verdict_ui
node_steam_pages -->|"scans members"| node_legacy_scanner
node_legacy_scanner -->|"requests bans"| node_steam_api
node_legacy_scanner -->|"renders verdicts"| node_verdict_ui
node_steam_pages -->|"scans matches"| node_match_history
node_steam_pages -->|"shows rating"| node_cs_rating
node_match_history -.->|"requests data"| node_worker
node_user -->|"chooses shortcut"| node_menu_shortcuts
node_menu_shortcuts -->|"opens page"| node_steam_pages
node_user -->|"configures"| node_options_ui
node_options_ui -->|"reads and writes"| node_sync_settings
node_friends_scanner -->|"reads preferences"| node_sync_settings
node_match_history -->|"reads preferences"| node_sync_settings
node_match_history -->|"opens options"| node_worker
node_steam_pages -->|"rewrites group links"| node_url_compat

click node_friends_scanner "https://github.com/ge-ku/ban-checker-for-steam/blob/master/checkbans.js"
click node_legacy_scanner "https://github.com/ge-ku/ban-checker-for-steam/blob/master/checkbans-old.js"
click node_verdict_ui "https://github.com/ge-ku/ban-checker-for-steam/blob/master/checkbans.js"
click node_match_history "https://github.com/ge-ku/ban-checker-for-steam/blob/master/gcpd730.js"
click node_cs_rating "https://github.com/ge-ku/ban-checker-for-steam/blob/master/csrating.js"
click node_menu_shortcuts "https://github.com/ge-ku/ban-checker-for-steam/blob/master/service_worker.js"
click node_worker "https://github.com/ge-ku/ban-checker-for-steam/blob/master/service_worker.js"
click node_options_ui "https://github.com/ge-ku/ban-checker-for-steam/blob/master/options.js"
click node_url_compat "https://github.com/ge-ku/ban-checker-for-steam/blob/master/replaceurl.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_friends_scanner,node_legacy_scanner,node_verdict_ui,node_url_compat,node_user toneBlue
class node_match_history,node_cs_rating toneAmber
class node_menu_shortcuts,node_worker,node_steam_api toneMint
class node_sync_settings,node_options_ui toneRose
class node_steam_pages toneIndigo
```

## Components

### Community Scanning

- [Friends scanner](https://github.com/ge-ku/ban-checker-for-steam/blob/master/checkbans.js): `checkbans.js`
- [Legacy scanner](https://github.com/ge-ku/ban-checker-for-steam/blob/master/checkbans-old.js): `checkbans-old.js`
- [Ban verdicts](https://github.com/ge-ku/ban-checker-for-steam/blob/master/checkbans.js): `checkbans.js`
- [Group URL compatibility](https://github.com/ge-ku/ban-checker-for-steam/blob/master/replaceurl.js): `replaceurl.js`

### Counter-Strike

- [Match history scan](https://github.com/ge-ku/ban-checker-for-steam/blob/master/gcpd730.js): `gcpd730.js`
- [CS rating display](https://github.com/ge-ku/ban-checker-for-steam/blob/master/csrating.js): `csrating.js`

### Extension Services

- [Page shortcuts](https://github.com/ge-ku/ban-checker-for-steam/blob/master/service_worker.js): `service_worker.js`
- [Extension worker](https://github.com/ge-ku/ban-checker-for-steam/blob/master/service_worker.js): `service_worker.js`

### Settings

- **Sync settings**
- [Options](https://github.com/ge-ku/ban-checker-for-steam/blob/master/options.js): `options.js`

### Other components

- **Steam user**
- **Steam pages**
- **Steam Web API**

## Connections

- Steam user → Steam pages: opens (evidence: `README.md`)
- Steam pages → Friends scanner: scans players (evidence: `checkbans.js`)
- Friends scanner → Extension worker: requests bans (evidence: `checkbans.js`)
- Extension worker → Steam Web API: fetches bans (evidence: `service_worker.js`)
- Extension worker → Friends scanner: returns data (evidence: `checkbans.js`)
- Friends scanner → Ban verdicts: renders verdicts (evidence: `checkbans.js`)
- Steam pages → Legacy scanner: scans members (evidence: `checkbans-old.js`)
- Legacy scanner → Steam Web API: requests bans (evidence: `checkbans-old.js`)
- Legacy scanner → Ban verdicts: renders verdicts (evidence: `checkbans-old.js`)
- Steam pages → Match history scan: scans matches (evidence: `README.md`)
- Steam pages → CS rating display: shows rating (evidence: `csrating.js`)
- Match history scan → Extension worker: requests data
- Steam user → Page shortcuts: chooses shortcut (evidence: `service_worker.js`)
- Page shortcuts → Steam pages: opens page (evidence: `service_worker.js`)
- Steam user → Options: configures (evidence: `options.js`)
- Options → Sync settings: reads and writes (evidence: `options.js`)
- Friends scanner → Sync settings: reads preferences (evidence: `checkbans.js`)
- Match history scan → Sync settings: reads preferences (evidence: `gcpd730.js`)
- Match history scan → Extension worker: opens options (evidence: `gcpd730.js`)
- Steam pages → Group URL compatibility: rewrites group links (evidence: `replaceurl.js`)
