# qazwsx3134/tix_html_remover architecture

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

- Interactive diagram: https://gitdiagram.com/qazwsx3134/tix_html_remover
- Repository: https://github.com/qazwsx3134/tix_html_remover

## Overview

##### Project type and purpose
- This is a set of browser-console JavaScript utilities (open-source snippets) tailored to two ticketing platforms: KKTIX and Tixcraft.
- Its goal is to be copy-pasted into the browser’s DevTools Console to automatically remove sold-out UI elements, count remaining tickets, log the results, and optionally reload the page when everything is sold out.

##### File structure
- Top-level files:
- README.md         → usage guide
- kktix.js          → console script for KKTIX
- tixcraft.js       → console script for Tixcraft (and a .txt mirror)
- No backend, no build scripts, no configuration: these are pure client-side snippets.

##### README for additional insights
- Describes step-by-step how to open DevTools and run the code.
- Shows two immediately-invoked functions (IIFEs) that:
- Query and remove DOM elements
- Count remaining `
- ` ticket items
- Log to console with styling
- Prompt for reload when sold out

##### Elements
- “User Browser”
- “DevTools Console”
- “kktix.js” module
- “tixcraft.js” module
- “KKTIX Page DOM”
- “Tixcraft Page DOM”
- User → DevTools (open/paste)
- DevTools → Script modules (execute)
- Script → Page DOM (query, remove, count)
- Script → DevTools Console (log)
- Script → Browser UI (confirm & reload)
- Green for external pages (DOM)
- Gray for DevTools & Browser UI
- Rounded rectangles for user interface components
- Rectangles for script logic

##### Emphasize
- Two parallel flows (KKTIX vs Tixcraft) and how they mirror each other.
- Optional reload loop to indicate continuous monitoring.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User and Documentation
    User["User Browser"]:::user
    subgraph "Documentation"
        Docs["README.md"]:::doc
    end

    %% Console and UI
    DevTools["DevTools Console"]:::console
    BrowserUI["Browser UI\n(Console, Confirm, Reload)"]:::ui

    %% Script Modules
    subgraph "Script Modules"
        kktix["kktix.js"]:::script
        tixcraftJS["tixcraft.js"]:::script
        tixcraftTXT["tixcraft.txt"]:::script
    end

    %% Target Page DOMs
    subgraph "Target Page DOMs"
        KKTIXDOM["KKTIX Event Page DOM"]:::page
        TIXDOM["Tixcraft Event Page DOM"]:::page
    end

    %% Flows
    User -->|"open DevTools & view README"| DevTools
    DevTools -->|"view usage guide"| Docs
    DevTools -->|"run kktix.js IIFE"| kktix
    DevTools -->|"run tixcraft.js IIFE"| tixcraftJS
    DevTools -->|"run tixcraft.txt IIFE"| tixcraftTXT

    kktix -->|"querySelectorAll/remove/count"| KKTIXDOM
    tixcraftJS -->|"querySelectorAll/remove/count"| TIXDOM
    tixcraftTXT -->|"querySelectorAll/remove/count"| TIXDOM

    kktix -->|"console.log results"| BrowserUI
    tixcraftJS -->|"console.log results"| BrowserUI
    tixcraftTXT -->|"console.log results"| BrowserUI

    kktix -->|"confirm() & location.reload()"| BrowserUI
    tixcraftJS -->|"confirm() & location.reload()"| BrowserUI
    tixcraftTXT -->|"confirm() & location.reload()"| BrowserUI

    BrowserUI -->|"reload triggers"| KKTIXDOM
    BrowserUI -->|"reload triggers"| TIXDOM

    %% Click Events
    click Docs "https://github.com/qazwsx3134/tix_html_remover/blob/main/README.md"
    click kktix "https://github.com/qazwsx3134/tix_html_remover/blob/main/kktix.js"
    click tixcraftJS "https://github.com/qazwsx3134/tix_html_remover/blob/main/tixcraft.js"
    click tixcraftTXT "https://github.com/qazwsx3134/tix_html_remover/blob/main/tixcraft.txt"

    %% Styles
    classDef user fill:#d3d3d3,stroke:#444,stroke-width:1px;
    classDef console fill:#d3d3d3,stroke:#444,stroke-width:1px;
    classDef ui fill:#d3d3d3,stroke:#444,stroke-width:1px;
    classDef script fill:#add8e6,stroke:#036,stroke-width:1px;
    classDef page fill:#98fb98,stroke:#060,stroke-width:1px;
    classDef doc fill:#fffacd,stroke:#666,stroke-width:1px;
```
