# scotchester/github-diff-filter architecture

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

- Interactive diagram: https://gitdiagram.com/scotchester/github-diff-filter
- Repository: https://github.com/scotchester/github-diff-filter

## Overview

This is a small bookmarklet that adds file filtering controls to GitHub comparison pages. The workflow is: a user runs it on a comparison page, enters comma-separated text to hide matching files, and can restore all files with the show-all control. The sampled app source shows the DOM operations and event bindings; the form and styling are separate source assets. The app’s UI includes are build-time references, so their exact runtime packaging is not represented as a separate subsystem.

Main entry points: [`src/app.js`](https://github.com/scotchester/github-diff-filter/blob/master/src/app.js) (Bookmarklet app), [`src/form.html`](https://github.com/scotchester/github-diff-filter/blob/master/src/form.html) (Filter controls), [`src/style.less`](https://github.com/scotchester/github-diff-filter/blob/master/src/style.less) (Overlay styling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bookmarklet["Bookmarklet"]
  node_app["Bookmarklet app<br/>[app.js]"]
  node_form["Filter controls<br/>[form.html]"]
  node_styles["Overlay styling<br/>[style.less]"]
  node_hide["Hide matching files<br/>[app.js]"]
  node_restore["Show all files<br/>[app.js]"]
end

node_user(("Bookmarklet user"))
node_comparison["GitHub comparison page"]

node_user -->|"runs bookmarklet"| node_app
node_app -->|"includes controls"| node_form
node_app -->|"includes styling"| node_styles
node_form -->|"submits query"| node_hide
node_form -->|"activates restore"| node_restore
node_hide -->|"hides matches"| node_comparison
node_restore -->|"shows all files"| node_comparison

click node_app "https://github.com/scotchester/github-diff-filter/blob/master/src/app.js"
click node_form "https://github.com/scotchester/github-diff-filter/blob/master/src/form.html"
click node_styles "https://github.com/scotchester/github-diff-filter/blob/master/src/style.less"
click node_hide "https://github.com/scotchester/github-diff-filter/blob/master/src/app.js"
click node_restore "https://github.com/scotchester/github-diff-filter/blob/master/src/app.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_app,node_form,node_styles,node_hide,node_restore,node_user toneBlue
class node_comparison toneIndigo
```

## Components

### Bookmarklet

- [Bookmarklet app](https://github.com/scotchester/github-diff-filter/blob/master/src/app.js): `src/app.js`
- [Filter controls](https://github.com/scotchester/github-diff-filter/blob/master/src/form.html): `src/form.html`
- [Overlay styling](https://github.com/scotchester/github-diff-filter/blob/master/src/style.less): `src/style.less`
- [Hide matching files](https://github.com/scotchester/github-diff-filter/blob/master/src/app.js): `src/app.js`
- [Show all files](https://github.com/scotchester/github-diff-filter/blob/master/src/app.js): `src/app.js`

### Other components

- **Bookmarklet user**
- **GitHub comparison page**

## Connections

- Bookmarklet user → Bookmarklet app: runs bookmarklet (evidence: `README.md`)
- Bookmarklet app → Filter controls: includes controls (evidence: `src/app.js`)
- Bookmarklet app → Overlay styling: includes styling (evidence: `src/app.js`)
- Filter controls → Hide matching files: submits query (evidence: `src/app.js`)
- Filter controls → Show all files: activates restore (evidence: `src/app.js`)
- Hide matching files → GitHub comparison page: hides matches (evidence: `src/app.js`)
- Show all files → GitHub comparison page: shows all files (evidence: `src/app.js`)
