# karaagexc/classic-twitter architecture

> Architecture diagram of the GitHub repository karaagexc/classic-twitter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/karaagexc/classic-twitter
- Repository: https://github.com/karaagexc/classic-twitter

## Overview

Classic Twitter is a Manifest V3 browser extension that visually restores Twitter-era branding, wording, and presentation on X while leaving timelines, posting, messaging, search, and authentication native. The user changes local preferences in the popup; the active page script reads those settings and adapts X’s interface, while extension styles supply the visual treatment. The README identifies v13-main.js as active and describes earlier scripts as retained reference code. The excerpts do not show manifest wiring or stylesheet filenames, so those relationships are represented only where the README documents them.

Main entry points: [`scripts/v13-main.js`](https://github.com/karaagexc/classic-twitter/blob/main/scripts/v13-main.js) (Interface restoration), [`manifest.json`](https://github.com/karaagexc/classic-twitter/blob/main/manifest.json) (Extension manifest), [`popup/popup.js`](https://github.com/karaagexc/classic-twitter/blob/main/popup/popup.js) (Preference popup), [`styles`](https://github.com/karaagexc/classic-twitter/tree/main/styles) (Classic palettes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_controls["Extension controls"]
  node_popup["Preference popup<br/>[popup.js]"]
  node_storage[("Local preferences")]
end

subgraph group_runtime["Page runtime"]
  node_manifest["Extension manifest<br/>[manifest.json]"]
  node_active["Interface restoration<br/>[v13-main.js]"]
  node_wording["Branding and wording<br/>[content.js]"]
  node_theme["Dynamic theme fixes"]
  node_home["Home refinement<br/>[home-refinement.js]"]
end

subgraph group_presentation["Visual presentation"]
  node_palette["Classic palettes"]
  node_chat["Chat styling<br/>[twitter-chat.css]"]
  node_art["Bundled artwork"]
end

subgraph group_reference["Retained scripts"]
  node_dynamic["Earlier theme fixes"]
  node_v12["v12 theme fixes<br/>[v12-theme-fixes.js]"]
end

node_user(("Extension user"))
node_page["X website"]

node_user -->|"changes settings"| node_popup
node_popup -->|"reads and saves"| node_storage
node_storage -->|"provides preferences"| node_active
node_manifest -->|"loads script"| node_active
node_active -->|"adapts interface"| node_page
node_manifest -->|"loads stylesheets"| node_palette
node_manifest -.->|"loads stylesheet"| node_chat
node_active -.->|"uses bundled artwork"| node_art

click node_popup "https://github.com/karaagexc/classic-twitter/blob/main/popup/popup.js"
click node_manifest "https://github.com/karaagexc/classic-twitter/blob/main/manifest.json"
click node_active "https://github.com/karaagexc/classic-twitter/blob/main/scripts/v13-main.js"
click node_wording "https://github.com/karaagexc/classic-twitter/blob/main/scripts/content.js"
click node_theme "https://github.com/karaagexc/classic-twitter/blob/main/scripts/dynamic-theme-fixes.js"
click node_home "https://github.com/karaagexc/classic-twitter/blob/main/scripts/home-refinement.js"
click node_palette "https://github.com/karaagexc/classic-twitter/tree/main/styles"
click node_chat "https://github.com/karaagexc/classic-twitter/blob/main/styles/twitter-chat.css"
click node_art "https://github.com/karaagexc/classic-twitter/tree/main/assets"
click node_dynamic "https://github.com/karaagexc/classic-twitter/blob/main/scripts/dynamic-theme-fixes.js"
click node_v12 "https://github.com/karaagexc/classic-twitter/blob/main/scripts/v12-theme-fixes.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_popup,node_storage,node_user toneBlue
class node_manifest,node_active,node_wording,node_theme,node_home toneAmber
class node_palette,node_chat,node_art toneMint
class node_dynamic,node_v12 toneRose
class node_page toneIndigo
```

## Components

### Extension controls

- [Preference popup](https://github.com/karaagexc/classic-twitter/blob/main/popup/popup.js): `popup/popup.js`
- **Local preferences**

### Page runtime

- [Extension manifest](https://github.com/karaagexc/classic-twitter/blob/main/manifest.json): `manifest.json`
- [Interface restoration](https://github.com/karaagexc/classic-twitter/blob/main/scripts/v13-main.js): `scripts/v13-main.js`
- [Branding and wording](https://github.com/karaagexc/classic-twitter/blob/main/scripts/content.js): `scripts/content.js`
- [Dynamic theme fixes](https://github.com/karaagexc/classic-twitter/blob/main/scripts/dynamic-theme-fixes.js): `scripts/dynamic-theme-fixes.js`
- [Home refinement](https://github.com/karaagexc/classic-twitter/blob/main/scripts/home-refinement.js): `scripts/home-refinement.js`

### Visual presentation

- [Classic palettes](https://github.com/karaagexc/classic-twitter/tree/main/styles): `styles`
- [Chat styling](https://github.com/karaagexc/classic-twitter/blob/main/styles/twitter-chat.css): `styles/twitter-chat.css`
- [Bundled artwork](https://github.com/karaagexc/classic-twitter/tree/main/assets): `assets`

### Retained scripts

- [Earlier theme fixes](https://github.com/karaagexc/classic-twitter/blob/main/scripts/dynamic-theme-fixes.js): `scripts/dynamic-theme-fixes.js`
- [v12 theme fixes](https://github.com/karaagexc/classic-twitter/blob/main/scripts/v12-theme-fixes.js): `scripts/v12-theme-fixes.js`

### Other components

- **Extension user**
- **X website**

## Connections

- Extension user → Preference popup: changes settings (evidence: `README.md`)
- Preference popup → Local preferences: reads and saves (evidence: `popup/popup.js`)
- Local preferences → Interface restoration: provides preferences (evidence: `scripts/v13-main.js`)
- Extension manifest → Interface restoration: loads script (evidence: `README.md`)
- Interface restoration → X website: adapts interface (evidence: `README.md`)
- Extension manifest → Classic palettes: loads stylesheets (evidence: `README.md`)
- Extension manifest → Chat styling: loads stylesheet
- Interface restoration → Bundled artwork: uses bundled artwork
